home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / gfx / misc / gnuplot-src.lha / gnuplot-3.7.1src / gnuplot-3.7.1.lha / gnuplot-3.7.1 / term / tkcanvas.trm < prev    next >
Unknown  |  1999-10-19  |  19.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Windows Terminal Configuration (other/windowsTerminalConfiguration) ext Unsupported
100% file data default
100% gt2 C/C++ Source Code default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 2f 2a 0a 20 2a 20 24 49 | 64 3a 20 74 00 00 00 00 |/*. * $I|d: t....|
|00000010| 00 00 00 00 08 2c 16 84 | 00 00 4c e9 36 2e 32 2e |.....,..|..L.6.2.|
|00000020| 33 20 31 39 39 39 2f 31 | 30 2f 31 39 20 31 36 3a |3 1999/1|0/19 16:|
|00000030| 30 30 3a 35 31 20 6c 68 | 65 63 6b 69 6e 67 20 45 |00:51 lh|ecking E|
|00000040| 78 70 20 24 0a 20 2a 0a | 20 2a 2f 0a 0a 2f 2a 20 |xp $. *.| */../* |
|00000050| 47 4e 55 50 4c 4f 54 20 | 2d 20 74 6b 63 61 6e 76 |GNUPLOT |- tkcanv|
|00000060| 61 73 2e 74 72 6d 20 2a | 2f 0a 0a 2f 2a 5b 0a 20 |as.trm *|/../*[. |
|00000070| 2a 20 43 6f 70 79 72 69 | 67 68 74 20 31 39 39 30 |* Copyri|ght 1990|
|00000080| 20 2d 20 31 39 39 33 2c | 20 31 39 39 38 0a 20 2a | - 1993,| 1998. *|
|00000090| 0a 20 2a 20 50 65 72 6d | 69 73 73 69 6f 6e 20 74 |. * Perm|ission t|
|000000a0| 6f 20 75 73 65 2c 20 63 | 6f 70 79 2c 20 61 6e 64 |o use, c|opy, and|
|000000b0| 20 64 69 73 74 72 69 62 | 75 74 65 20 74 68 69 73 | distrib|ute this|
|000000c0| 20 73 6f 66 74 77 61 72 | 65 20 61 6e 64 20 69 74 | softwar|e and it|
|000000d0| 73 0a 20 2a 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |s. * doc|umentati|
|000000e0| 6f 6e 20 66 6f 72 20 61 | 6e 79 20 70 75 72 70 6f |on for a|ny purpo|
|000000f0| 73 65 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |se with |or witho|
|00000100| 75 74 20 66 65 65 20 69 | 73 20 68 65 72 65 62 79 |ut fee i|s hereby|
|00000110| 20 67 72 61 6e 74 65 64 | 2c 0a 20 2a 20 70 72 6f | granted|,. * pro|
|00000120| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 65 20 61 |vided th|at the a|
|00000130| 62 6f 76 65 20 63 6f 70 | 79 72 69 67 68 74 20 6e |bove cop|yright n|
|00000140| 6f 74 69 63 65 20 61 70 | 70 65 61 72 20 69 6e 20 |otice ap|pear in |
|00000150| 61 6c 6c 20 63 6f 70 69 | 65 73 20 61 6e 64 0a 20 |all copi|es and. |
|00000160| 2a 20 74 68 61 74 20 62 | 6f 74 68 20 74 68 61 74 |* that b|oth that|
|00000170| 20 63 6f 70 79 72 69 67 | 68 74 20 6e 6f 74 69 63 | copyrig|ht notic|
|00000180| 65 20 61 6e 64 20 74 68 | 69 73 20 70 65 72 6d 69 |e and th|is permi|
|00000190| 73 73 69 6f 6e 20 6e 6f | 74 69 63 65 20 61 70 70 |ssion no|tice app|
|000001a0| 65 61 72 0a 20 2a 20 69 | 6e 20 73 75 70 70 6f 72 |ear. * i|n suppor|
|000001b0| 74 69 6e 67 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |ting doc|umentati|
|000001c0| 6f 6e 2e 0a 20 2a 0a 20 | 2a 20 50 65 72 6d 69 73 |on.. *. |* Permis|
|000001d0| 73 69 6f 6e 20 74 6f 20 | 6d 6f 64 69 66 79 20 74 |sion to |modify t|
|000001e0| 68 65 20 73 6f 66 74 77 | 61 72 65 20 69 73 20 67 |he softw|are is g|
|000001f0| 72 61 6e 74 65 64 2c 20 | 62 75 74 20 6e 6f 74 20 |ranted, |but not |
|00000200| 74 68 65 20 72 69 67 68 | 74 20 74 6f 0a 20 2a 20 |the righ|t to. * |
|00000210| 64 69 73 74 72 69 62 75 | 74 65 20 74 68 65 20 63 |distribu|te the c|
|00000220| 6f 6d 70 6c 65 74 65 20 | 6d 6f 64 69 66 69 65 64 |omplete |modified|
|00000230| 20 73 6f 75 72 63 65 20 | 63 6f 64 65 2e 20 20 4d | source |code. M|
|00000240| 6f 64 69 66 69 63 61 74 | 69 6f 6e 73 20 61 72 65 |odificat|ions are|
|00000250| 20 74 6f 0a 20 2a 20 62 | 65 20 64 69 73 74 72 69 | to. * b|e distri|
|00000260| 62 75 74 65 64 20 61 73 | 20 70 61 74 63 68 65 73 |buted as| patches|
|00000270| 20 74 6f 20 74 68 65 20 | 72 65 6c 65 61 73 65 64 | to the |released|
|00000280| 20 76 65 72 73 69 6f 6e | 2e 20 20 50 65 72 6d 69 | version|. Permi|
|00000290| 73 73 69 6f 6e 20 74 6f | 0a 20 2a 20 64 69 73 74 |ssion to|. * dist|
|000002a0| 72 69 62 75 74 65 20 62 | 69 6e 61 72 69 65 73 20 |ribute b|inaries |
|000002b0| 70 72 6f 64 75 63 65 64 | 20 62 79 20 63 6f 6d 70 |produced| by comp|
|000002c0| 69 6c 69 6e 67 20 6d 6f | 64 69 66 69 65 64 20 73 |iling mo|dified s|
|000002d0| 6f 75 72 63 65 73 20 69 | 73 20 67 72 61 6e 74 65 |ources i|s grante|
|000002e0| 64 2c 0a 20 2a 20 70 72 | 6f 76 69 64 65 64 20 79 |d,. * pr|ovided y|
|000002f0| 6f 75 0a 20 2a 20 20 20 | 31 2e 20 64 69 73 74 72 |ou. * |1. distr|
|00000300| 69 62 75 74 65 20 74 68 | 65 20 63 6f 72 72 65 73 |ibute th|e corres|
|00000310| 70 6f 6e 64 69 6e 67 20 | 73 6f 75 72 63 65 20 6d |ponding |source m|
|00000320| 6f 64 69 66 69 63 61 74 | 69 6f 6e 73 20 66 72 6f |odificat|ions fro|
|00000330| 6d 20 74 68 65 0a 20 2a | 20 20 20 20 72 65 6c 65 |m the. *| rele|
|00000340| 61 73 65 64 20 76 65 72 | 73 69 6f 6e 20 69 6e 20 |ased ver|sion in |
|00000350| 74 68 65 20 66 6f 72 6d | 20 6f 66 20 61 20 70 61 |the form| of a pa|
|00000360| 74 63 68 20 66 69 6c 65 | 20 61 6c 6f 6e 67 20 77 |tch file| along w|
|00000370| 69 74 68 20 74 68 65 20 | 62 69 6e 61 72 69 65 73 |ith the |binaries|
|00000380| 2c 0a 20 2a 20 20 20 32 | 2e 20 61 64 64 20 73 70 |,. * 2|. add sp|
|00000390| 65 63 69 61 6c 20 76 65 | 72 73 69 6f 6e 20 69 64 |ecial ve|rsion id|
|000003a0| 65 6e 74 69 66 69 63 61 | 74 69 6f 6e 20 74 6f 20 |entifica|tion to |
|000003b0| 64 69 73 74 69 6e 67 75 | 69 73 68 20 79 6f 75 72 |distingu|ish your|
|000003c0| 20 76 65 72 73 69 6f 6e | 0a 20 2a 20 20 20 20 69 | version|. * i|
|000003d0| 6e 20 61 64 64 69 74 69 | 6f 6e 20 74 6f 20 74 68 |n additi|on to th|
|000003e0| 65 20 62 61 73 65 20 72 | 65 6c 65 61 73 65 20 76 |e base r|elease v|
|000003f0| 65 72 73 69 6f 6e 20 6e | 75 6d 62 65 72 2c 0a 20 |ersion n|umber,. |
|00000400| 2a 20 20 20 33 2e 20 70 | 72 6f 76 69 64 65 20 79 |* 3. p|rovide y|
|00000410| 6f 75 72 20 6e 61 6d 65 | 20 61 6e 64 20 61 64 64 |our name| and add|
|00000420| 72 65 73 73 20 61 73 20 | 74 68 65 20 70 72 69 6d |ress as |the prim|
|00000430| 61 72 79 20 63 6f 6e 74 | 61 63 74 20 66 6f 72 20 |ary cont|act for |
|00000440| 74 68 65 0a 20 2a 20 20 | 20 20 73 75 70 70 6f 72 |the. * | suppor|
|00000450| 74 20 6f 66 20 79 6f 75 | 72 20 6d 6f 64 69 66 69 |t of you|r modifi|
|00000460| 65 64 20 76 65 72 73 69 | 6f 6e 2c 20 61 6e 64 0a |ed versi|on, and.|
|00000470| 20 2a 20 20 20 34 2e 20 | 72 65 74 61 69 6e 20 6f | * 4. |retain o|
|00000480| 75 72 20 63 6f 6e 74 61 | 63 74 20 69 6e 66 6f 72 |ur conta|ct infor|
|00000490| 6d 61 74 69 6f 6e 20 69 | 6e 20 72 65 67 61 72 64 |mation i|n regard|
|000004a0| 20 74 6f 20 75 73 65 20 | 6f 66 20 74 68 65 20 62 | to use |of the b|
|000004b0| 61 73 65 0a 20 2a 20 20 | 20 20 73 6f 66 74 77 61 |ase. * | softwa|
|000004c0| 72 65 2e 0a 20 2a 20 50 | 65 72 6d 69 73 73 69 6f |re.. * P|ermissio|
|000004d0| 6e 20 74 6f 20 64 69 73 | 74 72 69 62 75 74 65 20 |n to dis|tribute |
|000004e0| 74 68 65 20 72 65 6c 65 | 61 73 65 64 20 76 65 72 |the rele|ased ver|
|000004f0| 73 69 6f 6e 20 6f 66 20 | 74 68 65 20 73 6f 75 72 |sion of |the sour|
|00000500| 63 65 20 63 6f 64 65 20 | 61 6c 6f 6e 67 0a 20 2a |ce code |along. *|
|00000510| 20 77 69 74 68 20 63 6f | 72 72 65 73 70 6f 6e 64 | with co|rrespond|
|00000520| 69 6e 67 20 73 6f 75 72 | 63 65 20 6d 6f 64 69 66 |ing sour|ce modif|
|00000530| 69 63 61 74 69 6f 6e 73 | 20 69 6e 20 74 68 65 20 |ications| in the |
|00000540| 66 6f 72 6d 20 6f 66 20 | 61 20 70 61 74 63 68 20 |form of |a patch |
|00000550| 66 69 6c 65 20 69 73 0a | 20 2a 20 67 72 61 6e 74 |file is.| * grant|
|00000560| 65 64 20 77 69 74 68 20 | 73 61 6d 65 20 70 72 6f |ed with |same pro|
|00000570| 76 69 73 69 6f 6e 73 20 | 32 20 74 68 72 6f 75 67 |visions |2 throug|
|00000580| 68 20 34 20 66 6f 72 20 | 62 69 6e 61 72 79 20 64 |h 4 for |binary d|
|00000590| 69 73 74 72 69 62 75 74 | 69 6f 6e 73 2e 0a 20 2a |istribut|ions.. *|
|000005a0| 0a 20 2a 20 54 68 69 73 | 20 73 6f 66 74 77 61 72 |. * This| softwar|
|000005b0| 65 20 69 73 20 70 72 6f | 76 69 64 65 64 20 22 61 |e is pro|vided "a|
|000005c0| 73 20 69 73 22 20 77 69 | 74 68 6f 75 74 20 65 78 |s is" wi|thout ex|
|000005d0| 70 72 65 73 73 20 6f 72 | 20 69 6d 70 6c 69 65 64 |press or| implied|
|000005e0| 20 77 61 72 72 61 6e 74 | 79 0a 20 2a 20 74 6f 20 | warrant|y. * to |
|000005f0| 74 68 65 20 65 78 74 65 | 6e 74 20 70 65 72 6d 69 |the exte|nt permi|
|00000600| 74 74 65 64 20 62 79 20 | 61 70 70 6c 69 63 61 62 |tted by |applicab|
|00000610| 6c 65 20 6c 61 77 2e 0a | 5d 2a 2f 0a 0a 2f 2a 0a |le law..|]*/../*.|
|00000620| 20 2a 20 54 68 69 73 20 | 66 69 6c 65 20 69 73 20 | * This |file is |
|00000630| 69 6e 63 6c 75 64 65 64 | 20 62 79 20 2e 2e 2f 74 |included| by ../t|
|00000640| 65 72 6d 2e 63 2e 0a 20 | 2a 0a 20 2a 20 54 68 69 |erm.c.. |*. * Thi|
|00000650| 73 20 74 65 72 6d 69 6e | 61 6c 20 64 72 69 76 65 |s termin|al drive|
|00000660| 72 20 73 75 70 70 6f 72 | 74 73 3a 0a 20 2a 20 20 |r suppor|ts:. * |
|00000670| 54 6b 2f 54 63 6c 20 63 | 61 6e 76 61 73 20 77 69 |Tk/Tcl c|anvas wi|
|00000680| 64 67 65 74 73 0a 20 2a | 0a 20 2a 20 41 55 54 48 |dgets. *|. * AUTH|
|00000690| 4f 52 53 20 2d 20 6f 72 | 69 67 69 6e 61 6c 20 64 |ORS - or|iginal d|
|000006a0| 78 79 2e 74 72 6d 0a 20 | 2a 20 20 4d 61 72 74 69 |xy.trm. |* Marti|
|000006b0| 6e 20 59 69 69 2c 20 65 | 6c 6e 35 35 37 68 40 6d |n Yii, e|ln557h@m|
|000006c0| 6f 6e 75 33 2e 4f 5a 0a | 20 2a 20 20 46 75 72 74 |onu3.OZ.| * Furt|
|000006d0| 68 65 72 20 6d 6f 64 69 | 66 69 65 64 20 4a 61 6e |her modi|fied Jan|
|000006e0| 20 31 39 39 30 20 62 79 | 20 52 75 73 73 65 6c 6c | 1990 by| Russell|
|000006f0| 20 4c 61 6e 67 2c 20 72 | 6a 6c 40 6d 6f 6e 75 31 | Lang, r|jl@monu1|
|00000700| 2e 63 63 2e 6d 6f 6e 61 | 73 68 2e 6f 7a 0a 20 2a |.cc.mona|sh.oz. *|
|00000710| 0a 20 2a 20 50 6f 72 74 | 20 74 6f 20 74 68 65 20 |. * Port| to the |
|00000720| 54 6b 2f 54 63 6c 20 63 | 61 6e 76 61 73 20 77 69 |Tk/Tcl c|anvas wi|
|00000730| 64 67 65 74 20 20 0a 20 | 2a 20 20 44 2e 20 4a 65 |dget . |* D. Je|
|00000740| 66 66 20 44 69 6f 6e 6e | 65 2c 20 4a 75 6c 79 20 |ff Dionn|e, July |
|00000750| 31 39 39 35 20 6a 65 66 | 66 40 72 79 65 68 61 6d |1995 jef|f@ryeham|
|00000760| 2e 65 65 2e 72 79 65 72 | 73 6f 6e 2e 63 61 0a 20 |.ee.ryer|son.ca. |
|00000770| 2a 20 20 41 6c 65 78 20 | 57 6f 6f 2c 20 77 6f 6f |* Alex |Woo, woo|
|00000780| 40 70 6c 61 79 66 61 69 | 72 2e 73 74 61 6e 66 6f |@playfai|r.stanfo|
|00000790| 72 64 2e 65 64 75 0a 20 | 2a 0a 20 2a 20 73 65 6e |rd.edu. |*. * sen|
|000007a0| 64 20 79 6f 75 72 20 63 | 6f 6d 6d 65 6e 74 73 20 |d your c|omments |
|000007b0| 6f 72 20 73 75 67 67 65 | 73 74 69 6f 6e 73 20 74 |or sugge|stions t|
|000007c0| 6f 20 28 69 6e 66 6f 2d | 67 6e 75 70 6c 6f 74 40 |o (info-|gnuplot@|
|000007d0| 64 61 72 74 6d 6f 75 74 | 68 2e 65 64 75 29 2e 0a |dartmout|h.edu)..|
|000007e0| 20 2a 20 0a 20 2a 2f 0a | 0a 2f 2a 0a 20 2a 20 61 | * . */.|./*. * a|
|000007f0| 64 61 70 74 65 64 20 74 | 6f 20 74 68 65 20 6e 65 |dapted t|o the ne|
|00000800| 77 20 74 65 72 6d 69 6e | 61 6c 20 6c 61 79 6f 75 |w termin|al layou|
|00000810| 74 20 62 79 20 41 6c 65 | 78 20 57 6f 6f 20 28 53 |t by Ale|x Woo (S|
|00000820| 65 70 74 2e 20 31 39 39 | 36 29 0a 20 2a 2f 0a 0a |ept. 199|6). */..|
|00000830| 2f 2a 0a 20 2a 20 65 78 | 74 65 6e 64 65 64 20 69 |/*. * ex|tended i|
|00000840| 6e 74 65 72 61 63 74 69 | 76 65 20 54 6b 2f 54 63 |nteracti|ve Tk/Tc|
|00000850| 6c 20 63 61 70 61 62 69 | 6c 69 74 69 65 73 20 0a |l capabi|lities .|
|00000860| 20 2a 20 54 68 6f 6d 61 | 73 20 53 65 66 7a 69 63 | * Thoma|s Sefzic|
|00000870| 6b 2c 20 4d 61 72 63 68 | 20 31 39 39 39 2c 20 74 |k, March| 1999, t|
|00000880| 2e 73 65 66 7a 69 63 6b | 40 66 7a 2d 6a 75 65 6c |.sefzick|@fz-juel|
|00000890| 69 63 68 2e 64 65 0a 20 | 2a 0a 20 2a 20 61 64 64 |ich.de. |*. * add|
|000008a0| 65 64 20 74 68 65 20 70 | 65 72 6c 74 6b 2e 74 72 |ed the p|erltk.tr|
|000008b0| 6d 20 63 6f 64 65 20 77 | 72 69 74 74 65 6e 20 62 |m code w|ritten b|
|000008c0| 79 20 53 6c 61 76 65 6e | 20 52 65 7a 69 63 20 3c |y Slaven| Rezic <|
|000008d0| 65 73 65 72 74 65 40 63 | 73 2e 74 75 2d 62 65 72 |eserte@c|s.tu-ber|
|000008e0| 6c 69 6e 2e 64 65 3e 2c | 0a 20 2a 20 74 68 65 20 |lin.de>,|. * the |
|000008f0| 76 61 72 69 61 62 6c 65 | 20 27 74 6b 5f 70 65 72 |variable| 'tk_per|
|00000900| 6c 27 20 73 77 69 74 63 | 68 65 73 20 62 65 74 77 |l' switc|hes betw|
|00000910| 65 65 6e 20 74 63 6c 2f | 74 6b 20 61 6e 64 20 70 |een tcl/|tk and p|
|00000920| 65 72 6c 74 6b 20 63 6f | 64 65 2e 0a 20 2a 20 27 |erltk co|de.. * '|
|00000930| 6c 69 6e 65 77 69 64 74 | 68 27 20 61 6e 64 20 27 |linewidt|h' and '|
|00000940| 6a 75 73 74 69 66 79 20 | 74 65 78 74 27 20 61 64 |justify |text' ad|
|00000950| 64 65 64 2c 20 65 6e 64 | 73 20 6f 66 20 70 6c 6f |ded, end|s of plo|
|00000960| 74 74 65 64 20 6c 69 6e | 65 73 20 61 72 65 20 6e |tted lin|es are n|
|00000970| 6f 77 20 72 6f 75 6e 64 | 65 64 2e 0a 20 2a 20 69 |ow round|ed.. * i|
|00000980| 66 20 27 70 65 72 6c 74 | 6b 27 20 69 73 20 63 68 |f 'perlt|k' is ch|
|00000990| 6f 73 65 6e 2c 20 70 65 | 72 6c 20 63 6f 64 65 20 |osen, pe|rl code |
|000009a0| 69 73 20 70 72 6f 64 75 | 63 65 64 2c 20 6f 74 68 |is produ|ced, oth|
|000009b0| 65 72 77 69 73 65 20 74 | 63 6c 20 63 6f 64 65 2e |erwise t|cl code.|
|000009c0| 0a 20 2a 20 54 68 6f 6d | 61 73 20 53 65 66 7a 69 |. * Thom|as Sefzi|
|000009d0| 63 6b 2c 20 4d 61 79 20 | 31 39 39 39 2c 20 74 2e |ck, May |1999, t.|
|000009e0| 73 65 66 7a 69 63 6b 40 | 66 7a 2d 6a 75 65 6c 69 |sefzick@|fz-jueli|
|000009f0| 63 68 2e 64 65 0a 20 2a | 0a 20 2a 20 73 63 61 6c |ch.de. *|. * scal|
|00000a00| 65 20 70 6c 6f 74 20 74 | 6f 20 66 69 74 20 69 6e |e plot t|o fit in|
|00000a10| 74 6f 20 74 68 65 20 61 | 63 74 75 61 6c 20 73 69 |to the a|ctual si|
|00000a20| 7a 65 20 6f 66 20 74 68 | 65 20 63 61 6e 76 61 73 |ze of th|e canvas|
|00000a30| 20 61 73 20 72 65 70 6f | 72 74 65 64 20 62 79 0a | as repo|rted by.|
|00000a40| 20 2a 20 74 68 65 20 77 | 69 6e 64 6f 77 20 6d 61 | * the w|indow ma|
|00000a50| 6e 61 67 65 72 20 28 74 | 68 65 20 63 61 6e 76 61 |nager (t|he canva|
|00000a60| 73 20 69 74 73 65 6c 66 | 20 64 6f 65 73 6e 27 74 |s itself| doesn't|
|00000a70| 20 72 65 70 6f 72 74 20 | 69 74 73 20 72 65 61 6c | report |its real|
|00000a80| 20 73 69 7a 65 29 2e 0a | 20 2a 20 4d 61 74 74 20 | size)..| * Matt |
|00000a90| 57 69 6c 6c 69 73 2c 20 | 4f 63 74 6f 62 65 72 20 |Willis, |October |
|00000aa0| 31 39 39 39 2c 20 6d 61 | 74 74 62 77 69 6c 6c 69 |1999, ma|ttbwilli|
|00000ab0| 73 40 6d 79 2d 64 65 6a | 61 2e 63 6f 6d 0a 20 2a |s@my-dej|a.com. *|
|00000ac0| 2f 0a 0a 23 69 6e 63 6c | 75 64 65 20 22 64 72 69 |/..#incl|ude "dri|
|00000ad0| 76 65 72 2e 68 22 0a 0a | 23 69 66 64 65 66 20 54 |ver.h"..|#ifdef T|
|00000ae0| 45 52 4d 5f 52 45 47 49 | 53 54 45 52 0a 72 65 67 |ERM_REGI|STER.reg|
|00000af0| 69 73 74 65 72 5f 74 65 | 72 6d 28 74 6b 63 61 6e |ister_te|rm(tkcan|
|00000b00| 76 61 73 29 0a 23 65 6e | 64 69 66 0a 0a 23 69 66 |vas).#en|dif..#if|
|00000b10| 64 65 66 20 54 45 52 4d | 5f 50 52 4f 54 4f 0a 54 |def TERM|_PROTO.T|
|00000b20| 45 52 4d 5f 50 55 42 4c | 49 43 20 76 6f 69 64 20 |ERM_PUBL|IC void |
|00000b30| 54 4b 5f 6f 70 74 69 6f | 6e 73 20 5f 5f 50 52 4f |TK_optio|ns __PRO|
|00000b40| 54 4f 28 28 76 6f 69 64 | 29 29 3b 0a 54 45 52 4d |TO((void|));.TERM|
|00000b50| 5f 50 55 42 4c 49 43 20 | 76 6f 69 64 20 54 4b 5f |_PUBLIC |void TK_|
|00000b60| 69 6e 69 74 20 5f 5f 50 | 52 4f 54 4f 28 28 76 6f |init __P|ROTO((vo|
|00000b70| 69 64 29 29 3b 0a 54 45 | 52 4d 5f 50 55 42 4c 49 |id));.TE|RM_PUBLI|
|00000b80| 43 20 76 6f 69 64 20 54 | 4b 5f 67 72 61 70 68 69 |C void T|K_graphi|
|00000b90| 63 73 20 5f 5f 50 52 4f | 54 4f 28 28 76 6f 69 64 |cs __PRO|TO((void|
|00000ba0| 29 29 3b 0a 54 45 52 4d | 5f 50 55 42 4c 49 43 20 |));.TERM|_PUBLIC |
|00000bb0| 76 6f 69 64 20 54 4b 5f | 74 65 78 74 20 5f 5f 50 |void TK_|text __P|
|00000bc0| 52 4f 54 4f 28 28 76 6f | 69 64 29 29 3b 0a 54 45 |ROTO((vo|id));.TE|
|00000bd0| 52 4d 5f 50 55 42 4c 49 | 43 20 76 6f 69 64 20 54 |RM_PUBLI|C void T|
|00000be0| 4b 5f 6c 69 6e 65 74 79 | 70 65 20 5f 5f 50 52 4f |K_linety|pe __PRO|
|00000bf0| 54 4f 28 28 69 6e 74 20 | 6c 69 6e 65 74 79 70 65 |TO((int |linetype|
|00000c00| 29 29 3b 0a 54 45 52 4d | 5f 50 55 42 4c 49 43 20 |));.TERM|_PUBLIC |
|00000c10| 76 6f 69 64 20 54 4b 5f | 6d 6f 76 65 20 5f 5f 50 |void TK_|move __P|
|00000c20| 52 4f 54 4f 28 28 75 6e | 73 69 67 6e 65 64 20 69 |ROTO((un|signed i|
|00000c30| 6e 74 20 78 2c 20 75 6e | 73 69 67 6e 65 64 20 69 |nt x, un|signed i|
|00000c40| 6e 74 20 79 29 29 3b 0a | 54 45 52 4d 5f 50 55 42 |nt y));.|TERM_PUB|
|00000c50| 4c 49 43 20 76 6f 69 64 | 20 54 4b 5f 76 65 63 74 |LIC void| TK_vect|
|00000c60| 6f 72 20 5f 5f 50 52 4f | 54 4f 28 28 75 6e 73 69 |or __PRO|TO((unsi|
|00000c70| 67 6e 65 64 20 69 6e 74 | 20 78 2c 20 75 6e 73 69 |gned int| x, unsi|
|00000c80| 67 6e 65 64 20 69 6e 74 | 20 79 29 29 3b 0a 54 45 |gned int| y));.TE|
|00000c90| 52 4d 5f 50 55 42 4c 49 | 43 20 76 6f 69 64 20 54 |RM_PUBLI|C void T|
|00000ca0| 4b 5f 70 75 74 5f 74 65 | 78 74 20 5f 5f 50 52 4f |K_put_te|xt __PRO|
|00000cb0| 54 4f 28 28 75 6e 73 69 | 67 6e 65 64 20 69 6e 74 |TO((unsi|gned int|
|00000cc0| 20 78 2c 20 75 6e 73 69 | 67 6e 65 64 20 69 6e 74 | x, unsi|gned int|
|00000cd0| 20 79 2c 20 63 68 61 72 | 20 2a 73 74 72 29 29 3b | y, char| *str));|
|00000ce0| 0a 54 45 52 4d 5f 50 55 | 42 4c 49 43 20 76 6f 69 |.TERM_PU|BLIC voi|
|00000cf0| 64 20 54 4b 5f 72 65 73 | 65 74 20 5f 5f 50 52 4f |d TK_res|et __PRO|
|00000d00| 54 4f 28 28 76 6f 69 64 | 29 29 3b 0a 54 45 52 4d |TO((void|));.TERM|
|00000d10| 5f 50 55 42 4c 49 43 20 | 69 6e 74 20 54 4b 5f 6a |_PUBLIC |int TK_j|
|00000d20| 75 73 74 69 66 79 5f 74 | 65 78 74 20 5f 5f 50 52 |ustify_t|ext __PR|
|00000d30| 4f 54 4f 28 28 65 6e 75 | 6d 20 4a 55 53 54 49 46 |OTO((enu|m JUSTIF|
|00000d40| 59 29 29 3b 0a 54 45 52 | 4d 5f 50 55 42 4c 49 43 |Y));.TER|M_PUBLIC|
|00000d50| 20 69 6e 74 20 54 4b 5f | 73 65 74 5f 66 6f 6e 74 | int TK_|set_font|
|00000d60| 20 5f 5f 50 52 4f 54 4f | 28 28 63 68 61 72 20 2a | __PROTO|((char *|
|00000d70| 66 6f 6e 74 29 29 3b 0a | 54 45 52 4d 5f 50 55 42 |font));.|TERM_PUB|
|00000d80| 4c 49 43 20 76 6f 69 64 | 20 54 4b 5f 6c 69 6e 65 |LIC void| TK_line|
|00000d90| 77 69 64 74 68 20 5f 5f | 50 52 4f 54 4f 28 28 64 |width __|PROTO((d|
|00000da0| 6f 75 62 6c 65 20 6c 69 | 6e 65 77 69 64 74 68 29 |ouble li|newidth)|
|00000db0| 29 3b 0a 0a 23 64 65 66 | 69 6e 65 20 54 4b 5f 58 |);..#def|ine TK_X|
|00000dc0| 4d 41 58 20 31 30 30 30 | 0a 23 64 65 66 69 6e 65 |MAX 1000|.#define|
|00000dd0| 20 54 4b 5f 59 4d 41 58 | 20 31 30 30 30 0a 0a 23 | TK_YMAX| 1000..#|
|00000de0| 64 65 66 69 6e 65 20 54 | 4b 5f 58 4c 41 53 54 20 |define T|K_XLAST |
|00000df0| 28 54 4b 5f 58 4d 41 58 | 20 2d 20 31 29 0a 23 64 |(TK_XMAX| - 1).#d|
|00000e00| 65 66 69 6e 65 20 54 4b | 5f 59 4c 41 53 54 20 28 |efine TK|_YLAST (|
|00000e10| 54 4b 5f 58 4d 41 58 20 | 2d 20 31 29 0a 0a 23 64 |TK_XMAX |- 1)..#d|
|00000e20| 65 66 69 6e 65 20 54 4b | 5f 56 43 48 41 52 09 28 |efine TK|_VCHAR.(|
|00000e30| 32 35 29 09 2f 2a 20 64 | 6f 75 62 6c 65 20 61 63 |25)./* d|ouble ac|
|00000e40| 74 75 61 6c 20 68 65 69 | 67 68 74 20 6f 66 20 63 |tual hei|ght of c|
|00000e50| 68 61 72 61 63 74 65 72 | 73 20 2a 2f 0a 23 64 65 |haracter|s */.#de|
|00000e60| 66 69 6e 65 20 54 4b 5f | 48 43 48 41 52 09 28 31 |fine TK_|HCHAR.(1|
|00000e70| 36 29 09 2f 2a 20 61 63 | 74 75 61 6c 20 77 69 64 |6)./* ac|tual wid|
|00000e80| 74 68 20 69 6e 63 6c 75 | 64 69 6e 67 20 73 70 61 |th inclu|ding spa|
|00000e90| 63 69 6e 67 20 2a 2f 0a | 23 64 65 66 69 6e 65 20 |cing */.|#define |
|00000ea0| 54 4b 5f 56 54 49 43 09 | 28 31 38 29 0a 23 64 65 |TK_VTIC.|(18).#de|
|00000eb0| 66 69 6e 65 20 54 4b 5f | 48 54 49 43 09 28 31 38 |fine TK_|HTIC.(18|
|00000ec0| 29 0a 23 65 6e 64 69 66 | 20 2f 2a 20 54 45 52 4d |).#endif| /* TERM|
|00000ed0| 5f 50 52 4f 54 4f 20 2a | 2f 0a 0a 23 69 66 6e 64 |_PROTO *|/..#ifnd|
|00000ee0| 65 66 20 54 45 52 4d 5f | 50 52 4f 54 4f 5f 4f 4e |ef TERM_|PROTO_ON|
|00000ef0| 4c 59 0a 23 69 66 64 65 | 66 20 54 45 52 4d 5f 42 |LY.#ifde|f TERM_B|
|00000f00| 4f 44 59 0a 0a 2f 2a 20 | 70 6c 6f 74 32 64 2e 63 |ODY../* |plot2d.c|
|00000f10| 20 2a 2f 0a 65 78 74 65 | 72 6e 20 64 6f 75 62 6c | */.exte|rn doubl|
|00000f20| 65 20 6d 69 6e 5f 61 72 | 72 61 79 5b 5d 2c 20 6d |e min_ar|ray[], m|
|00000f30| 61 78 5f 61 72 72 61 79 | 5b 5d 2c 20 62 61 73 65 |ax_array|[], base|
|00000f40| 5f 61 72 72 61 79 5b 5d | 2c 20 6c 6f 67 5f 62 61 |_array[]|, log_ba|
|00000f50| 73 65 5f 61 72 72 61 79 | 5b 5d 3b 0a 65 78 74 65 |se_array|[];.exte|
|00000f60| 72 6e 20 54 42 4f 4f 4c | 45 41 4e 20 6c 6f 67 5f |rn TBOOL|EAN log_|
|00000f70| 61 72 72 61 79 5b 5d 3b | 0a 2f 2a 20 67 72 61 70 |array[];|./* grap|
|00000f80| 68 69 63 73 2e 63 20 2a | 2f 0a 65 78 74 65 72 6e |hics.c *|/.extern|
|00000f90| 20 69 6e 74 20 78 6c 65 | 66 74 2c 20 78 72 69 67 | int xle|ft, xrig|
|00000fa0| 68 74 2c 20 79 62 6f 74 | 2c 20 79 74 6f 70 3b 0a |ht, ybot|, ytop;.|
|00000fb0| 65 78 74 65 72 6e 20 54 | 42 4f 4f 4c 45 41 4e 20 |extern T|BOOLEAN |
|00000fc0| 69 73 5f 33 64 5f 70 6c | 6f 74 3b 0a 0a 2f 2a 20 |is_3d_pl|ot;../* |
|00000fd0| 73 74 61 74 69 63 20 69 | 6e 74 20 74 6b 5f 61 6e |static i|nt tk_an|
|00000fe0| 67 6c 65 20 3d 20 30 3b | 20 75 6e 75 73 65 64 2c |gle = 0;| unused,|
|00000ff0| 20 66 6f 72 20 6e 6f 77 | 20 2a 2f 0a 73 74 61 74 | for now| */.stat|
|00001000| 69 63 20 69 6e 74 20 74 | 6b 5f 6c 61 73 74 78 3b |ic int t|k_lastx;|
|00001010| 0a 73 74 61 74 69 63 20 | 69 6e 74 20 74 6b 5f 6c |.static |int tk_l|
|00001020| 61 73 74 79 3b 0a 73 74 | 61 74 69 63 20 69 6e 74 |asty;.st|atic int|
|00001030| 20 74 6b 5f 63 6f 6c 6f | 72 20 3d 20 30 3b 0a 73 | tk_colo|r = 0;.s|
|00001040| 74 61 74 69 63 20 63 68 | 61 72 20 74 6b 5f 61 6e |tatic ch|ar tk_an|
|00001050| 63 68 6f 72 5b 37 5d 20 | 3d 20 22 77 22 3b 0a 73 |chor[7] |= "w";.s|
|00001060| 74 61 74 69 63 20 64 6f | 75 62 6c 65 20 74 6b 5f |tatic do|uble tk_|
|00001070| 6c 69 6e 65 77 69 64 74 | 68 20 3d 20 31 2e 30 3b |linewidt|h = 1.0;|
|00001080| 0a 73 74 61 74 69 63 20 | 69 6e 74 20 74 6b 5f 70 |.static |int tk_p|
|00001090| 65 72 6c 20 3d 20 30 3b | 0a 73 74 61 74 69 63 20 |erl = 0;|.static |
|000010a0| 69 6e 74 20 74 6b 5f 69 | 6e 74 65 72 61 63 74 69 |int tk_i|nteracti|
|000010b0| 76 65 20 3d 20 30 3b 0a | 73 74 61 74 69 63 20 63 |ve = 0;.|static c|
|000010c0| 68 61 72 20 2a 74 6b 5f | 63 6f 6c 6f 72 73 5b 5d |har *tk_|colors[]|
|000010d0| 20 3d 20 7b 0a 20 20 20 | 20 22 62 6c 61 63 6b 22 | = {. | "black"|
|000010e0| 2c 20 22 67 72 61 79 22 | 2c 20 22 72 65 64 22 2c |, "gray"|, "red",|
|000010f0| 20 22 62 6c 75 65 22 2c | 20 22 67 72 65 65 6e 22 | "blue",| "green"|
|00001100| 2c 20 22 62 72 6f 77 6e | 22 2c 20 22 6d 61 67 65 |, "brown|", "mage|
|00001110| 6e 74 61 22 2c 20 22 63 | 79 61 6e 22 0a 7d 3b 0a |nta", "c|yan".};.|
|00001120| 0a 54 45 52 4d 5f 50 55 | 42 4c 49 43 20 76 6f 69 |.TERM_PU|BLIC voi|
|00001130| 64 0a 54 4b 5f 6f 70 74 | 69 6f 6e 73 28 29 0a 7b |d.TK_opt|ions().{|
|00001140| 0a 20 20 20 20 74 6b 5f | 70 65 72 6c 20 3d 20 30 |. tk_|perl = 0|
|00001150| 3b 0a 20 20 20 20 74 6b | 5f 69 6e 74 65 72 61 63 |;. tk|_interac|
|00001160| 74 69 76 65 20 3d 20 30 | 3b 0a 0a 20 20 20 20 69 |tive = 0|;.. i|
|00001170| 66 20 28 21 45 4e 44 5f | 4f 46 5f 43 4f 4d 4d 41 |f (!END_|OF_COMMA|
|00001180| 4e 44 29 20 7b 0a 09 69 | 66 20 28 61 6c 6d 6f 73 |ND) {..i|f (almos|
|00001190| 74 5f 65 71 75 61 6c 73 | 28 63 5f 74 6f 6b 65 6e |t_equals|(c_token|
|000011a0| 2c 20 22 70 24 65 72 6c | 74 6b 22 29 29 20 7b 0a |, "p$erl|tk")) {.|
|000011b0| 09 20 20 20 20 74 6b 5f | 70 65 72 6c 20 3d 20 31 |. tk_|perl = 1|
|000011c0| 3b 0a 09 20 20 20 20 63 | 5f 74 6f 6b 65 6e 2b 2b |;.. c|_token++|
|000011d0| 3b 0a 09 7d 0a 09 69 66 | 20 28 61 6c 6d 6f 73 74 |;..}..if| (almost|
|000011e0| 5f 65 71 75 61 6c 73 28 | 63 5f 74 6f 6b 65 6e 2c |_equals(|c_token,|
|000011f0| 20 22 69 24 6e 74 65 72 | 61 63 74 69 76 65 22 29 | "i$nter|active")|
|00001200| 29 20 7b 0a 09 20 20 20 | 20 74 6b 5f 69 6e 74 65 |) {.. | tk_inte|
|00001210| 72 61 63 74 69 76 65 20 | 3d 20 31 3b 0a 09 20 20 |ractive |= 1;.. |
|00001220| 20 20 63 5f 74 6f 6b 65 | 6e 2b 2b 3b 0a 09 7d 0a | c_toke|n++;..}.|
|00001230| 20 20 20 20 7d 0a 0a 20 | 20 20 20 73 70 72 69 6e | }.. | sprin|
|00001240| 74 66 28 74 65 72 6d 5f | 6f 70 74 69 6f 6e 73 2c |tf(term_|options,|
|00001250| 20 22 25 73 20 25 73 22 | 2c 0a 09 20 20 20 20 74 | "%s %s"|,.. t|
|00001260| 6b 5f 70 65 72 6c 20 3f | 20 22 70 65 72 6c 74 6b |k_perl ?| "perltk|
|00001270| 22 20 3a 20 22 22 2c 0a | 09 20 20 20 20 74 6b 5f |" : "",.|. tk_|
|00001280| 69 6e 74 65 72 61 63 74 | 69 76 65 20 3f 20 22 69 |interact|ive ? "i|
|00001290| 6e 74 65 72 61 63 74 69 | 76 65 22 20 3a 20 22 22 |nteracti|ve" : ""|
|000012a0| 29 3b 0a 7d 0a 0a 54 45 | 52 4d 5f 50 55 42 4c 49 |);.}..TE|RM_PUBLI|
|000012b0| 43 20 76 6f 69 64 0a 54 | 4b 5f 69 6e 69 74 28 29 |C void.T|K_init()|
|000012c0| 0a 7b 0a 7d 0a 0a 54 45 | 52 4d 5f 50 55 42 4c 49 |.{.}..TE|RM_PUBLI|
|000012d0| 43 20 76 6f 69 64 0a 54 | 4b 5f 67 72 61 70 68 69 |C void.T|K_graphi|
|000012e0| 63 73 28 29 0a 7b 0a 09 | 2f 2a 0a 09 2a 20 74 68 |cs().{..|/*..* th|
|000012f0| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 74 63 6c 20 |e result|ing tcl |
|00001300| 6f 72 20 70 65 72 6c 20 | 63 6f 64 65 20 74 61 6b |or perl |code tak|
|00001310| 65 73 20 74 68 65 20 61 | 63 74 75 61 6c 20 77 69 |es the a|ctual wi|
|00001320| 64 74 68 20 61 6e 64 20 | 68 65 69 67 68 74 0a 09 |dth and |height..|
|00001330| 2a 20 6f 66 20 74 68 65 | 20 64 65 66 69 6e 65 64 |* of the| defined|
|00001340| 20 63 61 6e 76 61 73 20 | 61 6e 64 20 73 63 61 6c | canvas |and scal|
|00001350| 65 73 20 74 68 65 20 70 | 6c 6f 74 20 74 6f 20 66 |es the p|lot to f|
|00001360| 69 74 2e 0a 09 2a 20 3d | 3e 20 4e 4f 54 45 3a 20 |it...* =|> NOTE: |
|00001370| 74 68 69 73 20 6d 61 6b | 65 73 20 27 73 65 74 20 |this mak|es 'set |
|00001380| 73 69 7a 65 27 20 75 73 | 65 6c 65 73 73 20 21 21 |size' us|eless !!|
|00001390| 21 0a 09 2a 20 75 6e 6c | 65 73 73 20 74 68 65 20 |!..* unl|ess the |
|000013a0| 6f 72 69 67 69 6e 61 6c | 20 77 69 64 74 68 20 61 |original| width a|
|000013b0| 6e 64 20 68 65 69 67 68 | 74 20 69 73 20 74 61 6b |nd heigh|t is tak|
|000013c0| 65 6e 20 69 6e 74 6f 20 | 61 63 63 6f 75 6e 74 0a |en into |account.|
|000013d0| 09 2a 20 62 79 20 73 6f | 6d 65 20 74 63 6c 20 6f |.* by so|me tcl o|
|000013e0| 72 20 70 65 72 6c 20 63 | 6f 64 65 2c 20 74 68 61 |r perl c|ode, tha|
|000013f0| 74 27 73 20 77 68 79 20 | 74 68 65 20 27 67 6e 75 |t's why |the 'gnu|
|00001400| 70 6c 6f 74 5f 70 6c 6f | 74 61 72 65 61 27 20 61 |plot_plo|tarea' a|
|00001410| 6e 64 0a 09 2a 20 27 67 | 6e 75 70 6c 6f 74 5f 61 |nd..* 'g|nuplot_a|
|00001420| 78 69 73 72 61 6e 67 65 | 73 27 20 70 72 6f 63 65 |xisrange|s' proce|
|00001430| 64 75 72 65 73 20 61 72 | 65 20 73 75 70 70 6c 69 |dures ar|e suppli|
|00001440| 65 64 2e 0a 09 2a 2f 0a | 20 20 20 20 69 66 20 28 |ed...*/.| if (|
|00001450| 74 6b 5f 70 65 72 6c 29 | 20 7b 0a 09 66 70 75 74 |tk_perl)| {..fput|
|00001460| 73 28 22 5c 0a 73 75 62 | 20 67 6e 75 70 6c 6f 74 |s("\.sub| gnuplot|
|00001470| 20 7b 5c 6e 5c 0a 6d 79 | 28 24 63 61 6e 29 20 3d | {\n\.my|($can) =|
|00001480| 20 40 5f 3b 5c 6e 5c 0a | 24 63 61 6e 2d 3e 64 65 | @_;\n\.|$can->de|
|00001490| 6c 65 74 65 28 27 61 6c | 6c 27 29 3b 5c 6e 5c 0a |lete('al|l');\n\.|
|000014a0| 6d 79 20 24 63 6d 78 20 | 3d 20 28 24 63 61 6e 2d |my $cmx |= ($can-|
|000014b0| 3e 63 6f 6e 66 69 67 75 | 72 65 28 2d 77 69 64 74 |>configu|re(-widt|
|000014c0| 68 29 29 5b 34 5d 3b 5c | 6e 5c 0a 6d 79 20 24 63 |h))[4];\|n\.my $c|
|000014d0| 6d 79 20 3d 20 28 24 63 | 61 6e 2d 3e 63 6f 6e 66 |my = ($c|an->conf|
|000014e0| 69 67 75 72 65 28 2d 68 | 65 69 67 68 74 29 29 5b |igure(-h|eight))[|
|000014f0| 34 5d 3b 5c 6e 5c 0a 6d | 79 20 24 63 6d 78 20 3d |4];\n\.m|y $cmx =|
|00001500| 20 24 63 61 6e 2d 3e 77 | 69 64 74 68 20 2d 20 32 | $can->w|idth - 2|
|00001510| 20 2a 20 24 63 61 6e 2d | 3e 63 67 65 74 28 2d 62 | * $can-|>cget(-b|
|00001520| 6f 72 64 65 72 29 3b 5c | 6e 5c 0a 69 66 20 28 24 |order);\|n\.if ($|
|00001530| 63 6d 78 20 3c 3d 20 31 | 29 20 7b 5c 6e 24 63 6d |cmx <= 1|) {\n$cm|
|00001540| 78 20 3d 20 28 24 63 61 | 6e 2d 3e 63 67 65 74 28 |x = ($ca|n->cget(|
|00001550| 2d 77 69 64 74 68 29 29 | 3b 5c 6e 7d 5c 6e 5c 0a |-width))|;\n}\n\.|
|00001560| 6d 79 20 24 63 6d 79 20 | 3d 20 24 63 61 6e 2d 3e |my $cmy |= $can->|
|00001570| 68 65 69 67 68 74 20 2d | 20 32 20 2a 20 24 63 61 |height -| 2 * $ca|
|00001580| 6e 2d 3e 63 67 65 74 28 | 2d 62 6f 72 64 65 72 29 |n->cget(|-border)|
|00001590| 3b 5c 6e 5c 0a 69 66 20 | 28 24 63 6d 79 20 3c 3d |;\n\.if |($cmy <=|
|000015a0| 20 31 29 20 7b 5c 6e 24 | 63 6d 79 20 3d 20 28 24 | 1) {\n$|cmy = ($|
|000015b0| 63 61 6e 2d 3e 63 67 65 | 74 28 2d 68 65 69 67 68 |can->cge|t(-heigh|
|000015c0| 74 29 29 3b 5c 6e 7d 5c | 6e 22 2c 0a 09 20 20 20 |t));\n}\|n",.. |
|000015d0| 20 20 20 67 70 6f 75 74 | 66 69 6c 65 29 3b 0a 20 | gpout|file);. |
|000015e0| 20 20 20 7d 20 65 6c 73 | 65 20 7b 0a 09 66 70 75 | } els|e {..fpu|
|000015f0| 74 73 28 22 5c 0a 70 72 | 6f 63 20 67 6e 75 70 6c |ts("\.pr|oc gnupl|
|00001600| 6f 74 20 63 61 6e 20 7b | 5c 6e 5c 0a 24 63 61 6e |ot can {|\n\.$can|
|00001610| 20 64 65 6c 65 74 65 20 | 61 6c 6c 5c 6e 5c 0a 73 | delete |all\n\.s|
|00001620| 65 74 20 63 6d 78 20 5b | 65 78 70 72 20 5b 77 69 |et cmx [|expr [wi|
|00001630| 6e 66 6f 20 77 69 64 74 | 68 20 24 63 61 6e 5d 2d |nfo widt|h $can]-|
|00001640| 32 2a 5b 24 63 61 6e 20 | 63 67 65 74 20 2d 62 6f |2*[$can |cget -bo|
|00001650| 72 64 65 72 5d 5d 5c 6e | 5c 0a 69 66 20 7b 24 63 |rder]]\n|\.if {$c|
|00001660| 6d 78 20 3c 3d 20 31 7d | 20 7b 73 65 74 20 63 6d |mx <= 1}| {set cm|
|00001670| 78 20 5b 24 63 61 6e 20 | 63 67 65 74 20 2d 77 69 |x [$can |cget -wi|
|00001680| 64 74 68 5d 7d 5c 6e 5c | 0a 73 65 74 20 63 6d 79 |dth]}\n\|.set cmy|
|00001690| 20 5b 65 78 70 72 20 5b | 77 69 6e 66 6f 20 68 65 | [expr [|winfo he|
|000016a0| 69 67 68 74 20 24 63 61 | 6e 5d 2d 32 2a 5b 24 63 |ight $ca|n]-2*[$c|
|000016b0| 61 6e 20 63 67 65 74 20 | 2d 62 6f 72 64 65 72 5d |an cget |-border]|
|000016c0| 5d 5c 6e 5c 0a 69 66 20 | 7b 24 63 6d 79 20 3c 3d |]\n\.if |{$cmy <=|
|000016d0| 20 31 7d 20 7b 73 65 74 | 20 63 6d 79 20 5b 24 63 | 1} {set| cmy [$c|
|000016e0| 61 6e 20 63 67 65 74 20 | 2d 68 65 69 67 68 74 5d |an cget |-height]|
|000016f0| 7d 5c 6e 22 2c 0a 09 20 | 20 20 20 20 20 67 70 6f |}\n",.. | gpo|
|00001700| 75 74 66 69 6c 65 29 3b | 0a 20 20 20 20 7d 0a 20 |utfile);|. }. |
|00001710| 20 20 20 74 6b 5f 6c 61 | 73 74 78 20 3d 20 74 6b | tk_la|stx = tk|
|00001720| 5f 6c 61 73 74 79 20 3d | 20 74 6b 5f 63 6f 6c 6f |_lasty =| tk_colo|
|00001730| 72 20 3d 20 30 3b 0a 7d | 0a 0a 54 45 52 4d 5f 50 |r = 0;.}|..TERM_P|
|00001740| 55 42 4c 49 43 20 76 6f | 69 64 0a 54 4b 5f 72 65 |UBLIC vo|id.TK_re|
|00001750| 73 65 74 28 29 0a 7b 0a | 7d 0a 0a 54 45 52 4d 5f |set().{.|}..TERM_|
|00001760| 50 55 42 4c 49 43 20 76 | 6f 69 64 0a 54 4b 5f 6c |PUBLIC v|oid.TK_l|
|00001770| 69 6e 65 74 79 70 65 28 | 6c 69 6e 65 74 79 70 65 |inetype(|linetype|
|00001780| 29 0a 69 6e 74 20 6c 69 | 6e 65 74 79 70 65 3b 0a |).int li|netype;.|
|00001790| 7b 0a 20 20 20 20 74 6b | 5f 63 6f 6c 6f 72 20 3d |{. tk|_color =|
|000017a0| 20 28 6c 69 6e 65 74 79 | 70 65 20 2b 20 32 29 20 | (linety|pe + 2) |
|000017b0| 26 20 37 3b 0a 7d 0a 0a | 54 45 52 4d 5f 50 55 42 |& 7;.}..|TERM_PUB|
|000017c0| 4c 49 43 20 76 6f 69 64 | 0a 54 4b 5f 6c 69 6e 65 |LIC void|.TK_line|
|000017d0| 77 69 64 74 68 28 6c 69 | 6e 65 77 69 64 74 68 29 |width(li|newidth)|
|000017e0| 0a 64 6f 75 62 6c 65 20 | 6c 69 6e 65 77 69 64 74 |.double |linewidt|
|000017f0| 68 3b 0a 7b 0a 20 20 20 | 20 74 6b 5f 6c 69 6e 65 |h;.{. | tk_line|
|00001800| 77 69 64 74 68 20 3d 20 | 6c 69 6e 65 77 69 64 74 |width = |linewidt|
|00001810| 68 3b 0a 7d 0a 0a 54 45 | 52 4d 5f 50 55 42 4c 49 |h;.}..TE|RM_PUBLI|
|00001820| 43 20 76 6f 69 64 0a 54 | 4b 5f 6d 6f 76 65 28 78 |C void.T|K_move(x|
|00001830| 2c 20 79 29 0a 75 6e 73 | 69 67 6e 65 64 20 69 6e |, y).uns|igned in|
|00001840| 74 20 78 2c 20 79 3b 0a | 7b 0a 20 20 20 20 74 6b |t x, y;.|{. tk|
|00001850| 5f 6c 61 73 74 78 20 3d | 20 78 3b 0a 20 20 20 20 |_lastx =| x;. |
|00001860| 74 6b 5f 6c 61 73 74 79 | 20 3d 20 31 30 30 30 20 |tk_lasty| = 1000 |
|00001870| 2d 20 79 3b 0a 7d 0a 0a | 23 64 65 66 69 6e 65 20 |- y;.}..|#define |
|00001880| 54 4b 5f 52 45 41 4c 5f | 56 41 4c 55 45 28 76 61 |TK_REAL_|VALUE(va|
|00001890| 6c 75 65 2c 61 78 69 73 | 29 20 5c 0a 20 28 6c 6f |lue,axis|) \. (lo|
|000018a0| 67 5f 61 72 72 61 79 5b | 61 78 69 73 5d 29 5c 0a |g_array[|axis])\.|
|000018b0| 20 3f 70 6f 77 28 62 61 | 73 65 5f 61 72 72 61 79 | ?pow(ba|se_array|
|000018c0| 5b 61 78 69 73 5d 2c 6d | 69 6e 5f 61 72 72 61 79 |[axis],m|in_array|
|000018d0| 5b 61 78 69 73 5d 2b 76 | 61 6c 75 65 2a 28 6d 61 |[axis]+v|alue*(ma|
|000018e0| 78 5f 61 72 72 61 79 5b | 61 78 69 73 5d 2d 6d 69 |x_array[|axis]-mi|
|000018f0| 6e 5f 61 72 72 61 79 5b | 61 78 69 73 5d 29 29 5c |n_array[|axis]))\|
|00001900| 0a 20 3a 6d 69 6e 5f 61 | 72 72 61 79 5b 61 78 69 |. :min_a|rray[axi|
|00001910| 73 5d 2b 76 61 6c 75 65 | 2a 28 6d 61 78 5f 61 72 |s]+value|*(max_ar|
|00001920| 72 61 79 5b 61 78 69 73 | 5d 2d 6d 69 6e 5f 61 72 |ray[axis|]-min_ar|
|00001930| 72 61 79 5b 61 78 69 73 | 5d 29 0a 0a 23 64 65 66 |ray[axis|])..#def|
|00001940| 69 6e 65 20 54 4b 5f 58 | 5f 56 41 4c 55 45 28 76 |ine TK_X|_VALUE(v|
|00001950| 61 6c 75 65 29 20 5c 0a | 20 28 64 6f 75 62 6c 65 |alue) \.| (double|
|00001960| 29 28 76 61 6c 75 65 2d | 78 6c 65 66 74 29 2f 28 |)(value-|xleft)/(|
|00001970| 64 6f 75 62 6c 65 29 28 | 78 72 69 67 68 74 2d 78 |double)(|xright-x|
|00001980| 6c 65 66 74 29 0a 0a 23 | 64 65 66 69 6e 65 20 54 |left)..#|define T|
|00001990| 4b 5f 59 5f 56 41 4c 55 | 45 28 76 61 6c 75 65 29 |K_Y_VALU|E(value)|
|000019a0| 20 5c 0a 20 28 64 6f 75 | 62 6c 65 29 28 28 54 4b | \. (dou|ble)((TK|
|000019b0| 5f 59 4d 41 58 2d 76 61 | 6c 75 65 29 2d 79 62 6f |_YMAX-va|lue)-ybo|
|000019c0| 74 29 2f 28 64 6f 75 62 | 6c 65 29 28 79 74 6f 70 |t)/(doub|le)(ytop|
|000019d0| 2d 79 62 6f 74 29 0a 0a | 54 45 52 4d 5f 50 55 42 |-ybot)..|TERM_PUB|
|000019e0| 4c 49 43 20 76 6f 69 64 | 0a 54 4b 5f 76 65 63 74 |LIC void|.TK_vect|
|000019f0| 6f 72 28 78 2c 20 79 29 | 0a 75 6e 73 69 67 6e 65 |or(x, y)|.unsigne|
|00001a00| 64 20 69 6e 74 20 78 2c | 20 79 3b 0a 7b 0a 09 2f |d int x,| y;.{../|
|00001a10| 2a 0a 09 2a 20 74 68 69 | 73 20 69 73 20 74 68 65 |*..* thi|s is the|
|00001a20| 20 31 73 74 20 70 61 72 | 74 20 6f 66 20 74 68 65 | 1st par|t of the|
|00001a30| 20 77 72 61 70 70 65 72 | 20 61 72 6f 75 6e 64 20 | wrapper| around |
|00001a40| 74 68 65 20 27 63 72 65 | 61 74 65 20 6c 69 6e 65 |the 'cre|ate line|
|00001a50| 27 20 63 6f 6d 6d 61 6e | 64 0a 09 2a 20 75 73 65 |' comman|d..* use|
|00001a60| 64 20 74 6f 20 62 69 6e | 64 20 73 6f 6d 65 20 61 |d to bin|d some a|
|00001a70| 63 74 69 6f 6e 73 20 74 | 6f 20 61 20 6c 69 6e 65 |ctions t|o a line|
|00001a80| 20 73 65 67 6d 65 6e 74 | 3a 0a 09 2a 20 62 69 6e | segment|:..* bin|
|00001a90| 64 20 7b 0a 09 2a 20 20 | 20 20 20 20 6e 6f 72 6d |d {..* | norm|
|00001aa0| 61 6c 20 63 72 65 61 74 | 65 20 6c 69 6e 65 20 63 |al creat|e line c|
|00001ab0| 6f 6d 6d 61 6e 64 0a 09 | 2a 20 20 20 20 20 20 7d |ommand..|* }|
|00001ac0| 20 67 6e 75 70 6c 6f 74 | 5f 78 79 28 73 6f 6d 65 | gnuplot|_xy(some|
|00001ad0| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 29 0a 09 2a | coordin|ates)..*|
|00001ae0| 2f 0a 20 20 20 20 69 66 | 20 28 74 6b 5f 69 6e 74 |/. if| (tk_int|
|00001af0| 65 72 61 63 74 69 76 65 | 20 26 26 20 21 69 73 5f |eractive| && !is_|
|00001b00| 33 64 5f 70 6c 6f 74 29 | 20 7b 0a 09 69 66 20 28 |3d_plot)| {..if (|
|00001b10| 74 6b 5f 70 65 72 6c 29 | 0a 09 20 20 20 20 66 70 |tk_perl)|.. fp|
|00001b20| 72 69 6e 74 66 28 67 70 | 6f 75 74 66 69 6c 65 2c |rintf(gp|outfile,|
|00001b30| 20 22 24 63 61 6e 2d 3e | 62 69 6e 64 28 22 29 3b | "$can->|bind(");|
|00001b40| 0a 09 65 6c 73 65 0a 09 | 20 20 20 20 66 70 72 69 |..else..| fpri|
|00001b50| 6e 74 66 28 67 70 6f 75 | 74 66 69 6c 65 2c 20 22 |ntf(gpou|tfile, "|
|00001b60| 24 63 61 6e 20 62 69 6e | 64 20 5b 5c 6e 22 29 3b |$can bin|d [\n");|
|00001b70| 0a 20 20 20 20 7d 0a 09 | 2f 2a 0a 09 20 2a 20 65 |. }..|/*.. * e|
|00001b80| 6e 64 20 6f 66 20 31 73 | 74 20 70 61 72 74 20 6f |nd of 1s|t part o|
|00001b90| 66 20 77 72 61 70 70 65 | 72 0a 09 20 2a 2f 0a 20 |f wrappe|r.. */. |
|00001ba0| 20 20 20 79 20 3d 20 31 | 30 30 30 20 2d 20 79 3b | y = 1|000 - y;|
|00001bb0| 0a 09 2f 2a 0a 09 20 2a | 20 68 65 72 65 20 69 73 |../*.. *| here is|
|00001bc0| 20 74 68 65 20 62 61 73 | 69 63 20 77 65 6c 6c 2d | the bas|ic well-|
|00001bd0| 6b 6e 6f 77 6e 20 63 6f | 6d 6d 61 6e 64 20 66 6f |known co|mmand fo|
|00001be0| 72 20 70 6c 6f 74 74 69 | 6e 67 20 61 20 6c 69 6e |r plotti|ng a lin|
|00001bf0| 65 20 73 65 67 6d 65 6e | 74 0a 09 20 2a 2f 0a 20 |e segmen|t.. */. |
|00001c00| 20 20 20 69 66 20 28 74 | 6b 5f 70 65 72 6c 29 20 | if (t|k_perl) |
|00001c10| 7b 0a 09 66 70 72 69 6e | 74 66 28 67 70 6f 75 74 |{..fprin|tf(gpout|
|00001c20| 66 69 6c 65 2c 22 5c 0a | 24 63 61 6e 2d 3e 63 72 |file,"\.|$can->cr|
|00001c30| 65 61 74 65 4c 69 6e 65 | 28 5c 0a 24 63 6d 78 20 |eateLine|(\.$cmx |
|00001c40| 2a 20 25 64 20 2f 20 31 | 30 30 30 2c 20 5c 0a 24 |* %d / 1|000, \.$|
|00001c50| 63 6d 79 20 2a 20 25 64 | 20 2f 20 31 30 30 30 2c |cmy * %d| / 1000,|
|00001c60| 20 5c 0a 24 63 6d 78 20 | 2a 20 25 64 20 2f 20 31 | \.$cmx |* %d / 1|
|00001c70| 30 30 30 2c 20 5c 0a 24 | 63 6d 79 20 2a 20 25 64 |000, \.$|cmy * %d|
|00001c80| 20 2f 20 31 30 30 30 2c | 20 2d 66 69 6c 6c 20 3d | / 1000,| -fill =|
|00001c90| 3e 20 71 7b 25 73 7d 2c | 20 2d 77 69 64 74 68 20 |> q{%s},| -width |
|00001ca0| 3d 3e 20 25 66 2c 20 2d | 63 61 70 73 74 79 6c 65 |=> %f, -|capstyle|
|00001cb0| 20 3d 3e 20 71 7b 72 6f | 75 6e 64 7d 29 22 2c 0a | => q{ro|und})",.|
|00001cc0| 09 09 74 6b 5f 6c 61 73 | 74 78 2c 20 74 6b 5f 6c |..tk_las|tx, tk_l|
|00001cd0| 61 73 74 79 2c 20 78 2c | 20 79 2c 20 74 6b 5f 63 |asty, x,| y, tk_c|
|00001ce0| 6f 6c 6f 72 73 5b 74 6b | 5f 63 6f 6c 6f 72 5d 2c |olors[tk|_color],|
|00001cf0| 20 74 6b 5f 6c 69 6e 65 | 77 69 64 74 68 29 3b 0a | tk_line|width);.|
|00001d00| 20 20 20 20 7d 20 65 6c | 73 65 20 7b 0a 09 66 70 | } el|se {..fp|
|00001d10| 72 69 6e 74 66 28 67 70 | 6f 75 74 66 69 6c 65 2c |rintf(gp|outfile,|
|00001d20| 22 5c 0a 24 63 61 6e 20 | 63 72 65 61 74 65 20 6c |"\.$can |create l|
|00001d30| 69 6e 65 20 5c 0a 5b 65 | 78 70 72 20 24 63 6d 78 |ine \.[e|xpr $cmx|
|00001d40| 20 2a 20 25 64 20 2f 31 | 30 30 30 5d 20 5c 0a 5b | * %d /1|000] \.[|
|00001d50| 65 78 70 72 20 24 63 6d | 79 20 2a 20 25 64 20 2f |expr $cm|y * %d /|
|00001d60| 31 30 30 30 5d 20 5c 0a | 5b 65 78 70 72 20 24 63 |1000] \.|[expr $c|
|00001d70| 6d 78 20 2a 20 25 64 20 | 2f 31 30 30 30 5d 20 5c |mx * %d |/1000] \|
|00001d80| 0a 5b 65 78 70 72 20 24 | 63 6d 79 20 2a 20 25 64 |.[expr $|cmy * %d|
|00001d90| 20 2f 31 30 30 30 5d 20 | 2d 66 69 6c 6c 20 25 73 | /1000] |-fill %s|
|00001da0| 20 2d 77 69 64 74 68 20 | 25 66 20 2d 63 61 70 73 | -width |%f -caps|
|00001db0| 74 79 6c 65 20 72 6f 75 | 6e 64 5c 6e 22 2c 0a 09 |tyle rou|nd\n",..|
|00001dc0| 09 74 6b 5f 6c 61 73 74 | 78 2c 20 74 6b 5f 6c 61 |.tk_last|x, tk_la|
|00001dd0| 73 74 79 2c 20 78 2c 20 | 79 2c 20 74 6b 5f 63 6f |sty, x, |y, tk_co|
|00001de0| 6c 6f 72 73 5b 74 6b 5f | 63 6f 6c 6f 72 5d 2c 20 |lors[tk_|color], |
|00001df0| 74 6b 5f 6c 69 6e 65 77 | 69 64 74 68 29 3b 0a 20 |tk_linew|idth);. |
|00001e00| 20 20 20 7d 0a 0a 09 2f | 2a 0a 09 20 2a 20 74 68 | }.../|*.. * th|
|00001e10| 69 73 20 69 73 20 74 68 | 65 20 32 6e 64 20 70 61 |is is th|e 2nd pa|
|00001e20| 72 74 20 6f 66 20 74 68 | 65 20 77 72 61 70 70 65 |rt of th|e wrappe|
|00001e30| 72 20 61 72 6f 75 6e 64 | 20 74 68 65 20 27 63 72 |r around| the 'cr|
|00001e40| 65 61 74 65 20 6c 69 6e | 65 27 0a 09 20 2a 20 63 |eate lin|e'.. * c|
|00001e50| 6f 6d 6d 61 6e 64 2c 20 | 69 74 20 67 65 6e 65 72 |ommand, |it gener|
|00001e60| 61 74 65 73 20 61 20 6d | 65 63 68 61 6e 69 73 6d |ates a m|echanism|
|00001e70| 20 77 68 69 63 68 20 63 | 61 6c 6c 73 20 27 67 6e | which c|alls 'gn|
|00001e80| 75 70 6c 6f 74 5f 78 79 | 27 20 66 6f 72 0a 09 20 |uplot_xy|' for.. |
|00001e90| 2a 20 74 68 65 20 6c 69 | 6e 65 20 73 65 67 6d 65 |* the li|ne segme|
|00001ea0| 6e 74 20 70 6f 69 6e 74 | 65 64 20 74 6f 20 62 79 |nt point|ed to by|
|00001eb0| 20 74 68 65 20 6d 6f 75 | 73 65 20 63 75 72 73 6f | the mou|se curso|
|00001ec0| 72 20 77 68 65 6e 20 61 | 20 6d 6f 75 73 65 0a 09 |r when a| mouse..|
|00001ed0| 20 2a 20 62 75 74 74 6f | 6e 20 69 73 20 70 72 65 | * butto|n is pre|
|00001ee0| 73 73 65 64 20 0a 09 20 | 2a 2f 0a 20 20 20 20 69 |ssed .. |*/. i|
|00001ef0| 66 20 28 74 6b 5f 69 6e | 74 65 72 61 63 74 69 76 |f (tk_in|teractiv|
|00001f00| 65 20 26 26 20 21 69 73 | 5f 33 64 5f 70 6c 6f 74 |e && !is|_3d_plot|
|00001f10| 29 20 7b 0a 09 69 66 20 | 28 74 6b 5f 70 65 72 6c |) {..if |(tk_perl|
|00001f20| 29 20 7b 0a 09 20 20 20 | 20 2f 2a 20 45 76 28 27 |) {.. | /* Ev('|
|00001f30| 57 27 29 20 6e 6f 74 20 | 6e 65 65 64 65 64 20 68 |W') not |needed h|
|00001f40| 65 72 65 2c 20 73 75 70 | 70 6c 69 65 64 20 61 6e |ere, sup|plied an|
|00001f50| 79 68 6f 77 2c 20 57 48 | 59 20 3f 3f 3f 20 2a 2f |yhow, WH|Y ??? */|
|00001f60| 0a 09 20 20 20 20 66 70 | 72 69 6e 74 66 28 67 70 |.. fp|rintf(gp|
|00001f70| 6f 75 74 66 69 6c 65 2c | 22 5c 0a 2c 20 27 3c 42 |outfile,|"\., '<B|
|00001f80| 75 74 74 6f 6e 3e 27 20 | 3d 3e 20 5c 0a 5b 5c 5c |utton>' |=> \.[\\|
|00001f90| 26 67 6e 75 70 6c 6f 74 | 5f 78 79 2c 20 25 66 2c |&gnuplot|_xy, %f,|
|00001fa0| 20 25 66 2c 20 25 66 2c | 20 25 66 2c 20 25 66 2c | %f, %f,| %f, %f,|
|00001fb0| 20 25 66 2c 20 25 66 2c | 20 25 66 2c 22 2c 0a 09 | %f, %f,| %f,",..|
|00001fc0| 09 20 20 20 20 54 4b 5f | 52 45 41 4c 5f 56 41 4c |. TK_|REAL_VAL|
|00001fd0| 55 45 28 54 4b 5f 58 5f | 56 41 4c 55 45 28 74 6b |UE(TK_X_|VALUE(tk|
|00001fe0| 5f 6c 61 73 74 78 29 2c | 20 46 49 52 53 54 5f 58 |_lastx),| FIRST_X|
|00001ff0| 5f 41 58 49 53 29 2c 0a | 09 09 20 20 20 20 54 4b |_AXIS),.|.. TK|
|00002000| 5f 52 45 41 4c 5f 56 41 | 4c 55 45 28 54 4b 5f 59 |_REAL_VA|LUE(TK_Y|
|00002010| 5f 56 41 4c 55 45 28 74 | 6b 5f 6c 61 73 74 79 29 |_VALUE(t|k_lasty)|
|00002020| 2c 20 46 49 52 53 54 5f | 59 5f 41 58 49 53 29 2c |, FIRST_|Y_AXIS),|
|00002030| 0a 09 09 20 20 20 20 54 | 4b 5f 52 45 41 4c 5f 56 |... T|K_REAL_V|
|00002040| 41 4c 55 45 28 54 4b 5f | 58 5f 56 41 4c 55 45 28 |ALUE(TK_|X_VALUE(|
|00002050| 74 6b 5f 6c 61 73 74 78 | 29 2c 20 53 45 43 4f 4e |tk_lastx|), SECON|
|00002060| 44 5f 58 5f 41 58 49 53 | 29 2c 0a 09 09 20 20 20 |D_X_AXIS|),... |
|00002070| 20 54 4b 5f 52 45 41 4c | 5f 56 41 4c 55 45 28 54 | TK_REAL|_VALUE(T|
|00002080| 4b 5f 59 5f 56 41 4c 55 | 45 28 74 6b 5f 6c 61 73 |K_Y_VALU|E(tk_las|
|00002090| 74 79 29 2c 20 53 45 43 | 4f 4e 44 5f 59 5f 41 58 |ty), SEC|OND_Y_AX|
|000020a0| 49 53 29 2c 0a 09 09 20 | 20 20 20 54 4b 5f 52 45 |IS),... | TK_RE|
|000020b0| 41 4c 5f 56 41 4c 55 45 | 28 54 4b 5f 58 5f 56 41 |AL_VALUE|(TK_X_VA|
|000020c0| 4c 55 45 28 78 29 2c 20 | 46 49 52 53 54 5f 58 5f |LUE(x), |FIRST_X_|
|000020d0| 41 58 49 53 29 2c 0a 09 | 09 20 20 20 20 54 4b 5f |AXIS),..|. TK_|
|000020e0| 52 45 41 4c 5f 56 41 4c | 55 45 28 54 4b 5f 59 5f |REAL_VAL|UE(TK_Y_|
|000020f0| 56 41 4c 55 45 28 79 29 | 2c 20 46 49 52 53 54 5f |VALUE(y)|, FIRST_|
|00002100| 59 5f 41 58 49 53 29 2c | 0a 09 09 20 20 20 20 54 |Y_AXIS),|... T|
|00002110| 4b 5f 52 45 41 4c 5f 56 | 41 4c 55 45 28 54 4b 5f |K_REAL_V|ALUE(TK_|
|00002120| 58 5f 56 41 4c 55 45 28 | 78 29 2c 20 53 45 43 4f |X_VALUE(|x), SECO|
|00002130| 4e 44 5f 58 5f 41 58 49 | 53 29 2c 0a 09 09 20 20 |ND_X_AXI|S),... |
|00002140| 20 20 54 4b 5f 52 45 41 | 4c 5f 56 41 4c 55 45 28 | TK_REA|L_VALUE(|
|00002150| 54 4b 5f 59 5f 56 41 4c | 55 45 28 79 29 2c 20 53 |TK_Y_VAL|UE(y), S|
|00002160| 45 43 4f 4e 44 5f 59 5f | 41 58 49 53 29 29 3b 0a |ECOND_Y_|AXIS));.|
|00002170| 09 20 20 20 20 69 66 20 | 28 6c 6f 67 5f 61 72 72 |. if |(log_arr|
|00002180| 61 79 5b 46 49 52 53 54 | 5f 58 5f 41 58 49 53 5d |ay[FIRST|_X_AXIS]|
|00002190| 29 20 7b 0a 09 09 66 70 | 72 69 6e 74 66 28 67 70 |) {...fp|rintf(gp|
|000021a0| 6f 75 74 66 69 6c 65 2c | 20 22 20 25 66 2c 22 2c |outfile,| " %f,",|
|000021b0| 0a 09 09 09 54 4b 5f 52 | 45 41 4c 5f 56 41 4c 55 |....TK_R|EAL_VALU|
|000021c0| 45 28 54 4b 5f 58 5f 56 | 41 4c 55 45 28 30 2e 35 |E(TK_X_V|ALUE(0.5|
|000021d0| 20 2a 20 28 78 20 2b 20 | 74 6b 5f 6c 61 73 74 78 | * (x + |tk_lastx|
|000021e0| 29 29 2c 20 46 49 52 53 | 54 5f 58 5f 41 58 49 53 |)), FIRS|T_X_AXIS|
|000021f0| 29 29 3b 0a 09 20 20 20 | 20 7d 20 65 6c 73 65 20 |));.. | } else |
|00002200| 7b 0a 09 09 66 70 72 69 | 6e 74 66 28 67 70 6f 75 |{...fpri|ntf(gpou|
|00002210| 74 66 69 6c 65 2c 20 22 | 20 5c 22 5c 22 2c 22 29 |tfile, "| \"\",")|
|00002220| 3b 0a 09 20 20 20 20 7d | 0a 09 20 20 20 20 69 66 |;.. }|.. if|
|00002230| 20 28 6c 6f 67 5f 61 72 | 72 61 79 5b 46 49 52 53 | (log_ar|ray[FIRS|
|00002240| 54 5f 59 5f 41 58 49 53 | 5d 29 20 7b 0a 09 09 66 |T_Y_AXIS|]) {...f|
|00002250| 70 72 69 6e 74 66 28 67 | 70 6f 75 74 66 69 6c 65 |printf(g|poutfile|
|00002260| 2c 20 22 20 25 66 2c 22 | 2c 0a 09 09 09 54 4b 5f |, " %f,"|,....TK_|
|00002270| 52 45 41 4c 5f 56 41 4c | 55 45 28 54 4b 5f 59 5f |REAL_VAL|UE(TK_Y_|
|00002280| 56 41 4c 55 45 28 30 2e | 35 20 2a 20 28 79 20 2b |VALUE(0.|5 * (y +|
|00002290| 20 74 6b 5f 6c 61 73 74 | 79 29 29 2c 20 46 49 52 | tk_last|y)), FIR|
|000022a0| 53 54 5f 59 5f 41 58 49 | 53 29 29 3b 0a 09 20 20 |ST_Y_AXI|S));.. |
|000022b0| 20 20 7d 20 65 6c 73 65 | 20 7b 0a 09 09 66 70 72 | } else| {...fpr|
|000022c0| 69 6e 74 66 28 67 70 6f | 75 74 66 69 6c 65 2c 20 |intf(gpo|utfile, |
|000022d0| 22 20 5c 22 5c 22 2c 22 | 29 3b 0a 09 20 20 20 20 |" \"\","|);.. |
|000022e0| 7d 0a 09 20 20 20 20 69 | 66 20 28 6c 6f 67 5f 61 |}.. i|f (log_a|
|000022f0| 72 72 61 79 5b 53 45 43 | 4f 4e 44 5f 58 5f 41 58 |rray[SEC|OND_X_AX|
|00002300| 49 53 5d 29 20 7b 0a 09 | 09 66 70 72 69 6e 74 66 |IS]) {..|.fprintf|
|00002310| 28 67 70 6f 75 74 66 69 | 6c 65 2c 20 22 20 25 66 |(gpoutfi|le, " %f|
|00002320| 2c 22 2c 0a 09 09 09 54 | 4b 5f 52 45 41 4c 5f 56 |,",....T|K_REAL_V|
|00002330| 41 4c 55 45 28 54 4b 5f | 58 5f 56 41 4c 55 45 28 |ALUE(TK_|X_VALUE(|
|00002340| 30 2e 35 20 2a 20 28 78 | 20 2b 20 74 6b 5f 6c 61 |0.5 * (x| + tk_la|
|00002350| 73 74 78 29 29 2c 20 53 | 45 43 4f 4e 44 5f 58 5f |stx)), S|ECOND_X_|
|00002360| 41 58 49 53 29 29 3b 0a | 09 20 20 20 20 7d 20 65 |AXIS));.|. } e|
|00002370| 6c 73 65 20 7b 0a 09 09 | 66 70 72 69 6e 74 66 28 |lse {...|fprintf(|
|00002380| 67 70 6f 75 74 66 69 6c | 65 2c 20 22 20 5c 22 5c |gpoutfil|e, " \"\|
|00002390| 22 2c 22 29 3b 0a 09 20 | 20 20 20 7d 0a 09 20 20 |",");.. | }.. |
|000023a0| 20 20 69 66 20 28 6c 6f | 67 5f 61 72 72 61 79 5b | if (lo|g_array[|
|000023b0| 53 45 43 4f 4e 44 5f 59 | 5f 41 58 49 53 5d 29 20 |SECOND_Y|_AXIS]) |
|000023c0| 7b 0a 09 09 66 70 72 69 | 6e 74 66 28 67 70 6f 75 |{...fpri|ntf(gpou|
|000023d0| 74 66 69 6c 65 2c 20 22 | 20 25 66 22 2c 0a 09 09 |tfile, "| %f",...|
|000023e0| 09 54 4b 5f 52 45 41 4c | 5f 56 41 4c 55 45 28 54 |.TK_REAL|_VALUE(T|
|000023f0| 4b 5f 59 5f 56 41 4c 55 | 45 28 30 2e 35 20 2a 20 |K_Y_VALU|E(0.5 * |
|00002400| 28 79 20 2b 20 74 6b 5f | 6c 61 73 74 79 29 29 2c |(y + tk_|lasty)),|
|00002410| 20 53 45 43 4f 4e 44 5f | 59 5f 41 58 49 53 29 29 | SECOND_|Y_AXIS))|
|00002420| 3b 0a 09 20 20 20 20 7d | 20 65 6c 73 65 20 7b 0a |;.. }| else {.|
|00002430| 09 09 66 70 72 69 6e 74 | 66 28 67 70 6f 75 74 66 |..fprint|f(gpoutf|
|00002440| 69 6c 65 2c 20 22 20 5c | 22 5c 22 22 29 3b 0a 09 |ile, " \|"\"");..|
|00002450| 20 20 20 20 7d 0a 09 20 | 20 20 20 66 70 72 69 6e | }.. | fprin|
|00002460| 74 66 28 67 70 6f 75 74 | 66 69 6c 65 2c 20 22 5d |tf(gpout|file, "]|
|00002470| 29 3b 5c 6e 22 29 3b 0a | 09 7d 20 65 6c 73 65 20 |);\n");.|.} else |
|00002480| 7b 0a 09 20 20 20 20 66 | 70 72 69 6e 74 66 28 67 |{.. f|printf(g|
|00002490| 70 6f 75 74 66 69 6c 65 | 2c 22 5c 0a 5d 20 3c 42 |poutfile|,"\.] <B|
|000024a0| 75 74 74 6f 6e 3e 20 5c | 0a 5c 22 67 6e 75 70 6c |utton> \|.\"gnupl|
|000024b0| 6f 74 5f 78 79 20 25 25 | 57 20 25 66 20 25 66 20 |ot_xy %%|W %f %f |
|000024c0| 25 66 20 25 66 20 25 66 | 20 25 66 20 25 66 20 25 |%f %f %f| %f %f %|
|000024d0| 66 22 2c 0a 09 09 20 20 | 20 20 54 4b 5f 52 45 41 |f",... | TK_REA|
|000024e0| 4c 5f 56 41 4c 55 45 28 | 54 4b 5f 58 5f 56 41 4c |L_VALUE(|TK_X_VAL|
|000024f0| 55 45 28 74 6b 5f 6c 61 | 73 74 78 29 2c 20 46 49 |UE(tk_la|stx), FI|
|00002500| 52 53 54 5f 58 5f 41 58 | 49 53 29 2c 0a 09 09 20 |RST_X_AX|IS),... |
|00002510| 20 20 20 54 4b 5f 52 45 | 41 4c 5f 56 41 4c 55 45 | TK_RE|AL_VALUE|
|00002520| 28 54 4b 5f 59 5f 56 41 | 4c 55 45 28 74 6b 5f 6c |(TK_Y_VA|LUE(tk_l|
|00002530| 61 73 74 79 29 2c 20 46 | 49 52 53 54 5f 59 5f 41 |asty), F|IRST_Y_A|
|00002540| 58 49 53 29 2c 0a 09 09 | 20 20 20 20 54 4b 5f 52 |XIS),...| TK_R|
|00002550| 45 41 4c 5f 56 41 4c 55 | 45 28 54 4b 5f 58 5f 56 |EAL_VALU|E(TK_X_V|
|00002560| 41 4c 55 45 28 74 6b 5f | 6c 61 73 74 78 29 2c 20 |ALUE(tk_|lastx), |
|00002570| 53 45 43 4f 4e 44 5f 58 | 5f 41 58 49 53 29 2c 0a |SECOND_X|_AXIS),.|
|00002580| 09 09 20 20 20 20 54 4b | 5f 52 45 41 4c 5f 56 41 |.. TK|_REAL_VA|
|00002590| 4c 55 45 28 54 4b 5f 59 | 5f 56 41 4c 55 45 28 74 |LUE(TK_Y|_VALUE(t|
|000025a0| 6b 5f 6c 61 73 74 79 29 | 2c 20 53 45 43 4f 4e 44 |k_lasty)|, SECOND|
|000025b0| 5f 59 5f 41 58 49 53 29 | 2c 0a 09 09 20 20 20 20 |_Y_AXIS)|,... |
|000025c0| 54 4b 5f 52 45 41 4c 5f | 56 41 4c 55 45 28 54 4b |TK_REAL_|VALUE(TK|
|000025d0| 5f 58 5f 56 41 4c 55 45 | 28 78 29 2c 20 46 49 52 |_X_VALUE|(x), FIR|
|000025e0| 53 54 5f 58 5f 41 58 49 | 53 29 2c 0a 09 09 20 20 |ST_X_AXI|S),... |
|000025f0| 20 20 54 4b 5f 52 45 41 | 4c 5f 56 41 4c 55 45 28 | TK_REA|L_VALUE(|
|00002600| 54 4b 5f 59 5f 56 41 4c | 55 45 28 79 29 2c 20 46 |TK_Y_VAL|UE(y), F|
|00002610| 49 52 53 54 5f 59 5f 41 | 58 49 53 29 2c 0a 09 09 |IRST_Y_A|XIS),...|
|00002620| 20 20 20 20 54 4b 5f 52 | 45 41 4c 5f 56 41 4c 55 | TK_R|EAL_VALU|
|00002630| 45 28 54 4b 5f 58 5f 56 | 41 4c 55 45 28 78 29 2c |E(TK_X_V|ALUE(x),|
|00002640| 20 53 45 43 4f 4e 44 5f | 58 5f 41 58 49 53 29 2c | SECOND_|X_AXIS),|
|00002650| 0a 09 09 20 20 20 20 54 | 4b 5f 52 45 41 4c 5f 56 |... T|K_REAL_V|
|00002660| 41 4c 55 45 28 54 4b 5f | 59 5f 56 41 4c 55 45 28 |ALUE(TK_|Y_VALUE(|
|00002670| 79 29 2c 20 53 45 43 4f | 4e 44 5f 59 5f 41 58 49 |y), SECO|ND_Y_AXI|
|00002680| 53 29 29 3b 0a 09 20 20 | 20 20 69 66 20 28 6c 6f |S));.. | if (lo|
|00002690| 67 5f 61 72 72 61 79 5b | 46 49 52 53 54 5f 58 5f |g_array[|FIRST_X_|
|000026a0| 41 58 49 53 5d 29 20 7b | 0a 09 09 66 70 72 69 6e |AXIS]) {|...fprin|
|000026b0| 74 66 28 67 70 6f 75 74 | 66 69 6c 65 2c 20 22 20 |tf(gpout|file, " |
|000026c0| 25 66 22 2c 0a 09 09 09 | 54 4b 5f 52 45 41 4c 5f |%f",....|TK_REAL_|
|000026d0| 56 41 4c 55 45 28 54 4b | 5f 58 5f 56 41 4c 55 45 |VALUE(TK|_X_VALUE|
|000026e0| 28 30 2e 35 20 2a 20 28 | 78 20 2b 20 74 6b 5f 6c |(0.5 * (|x + tk_l|
|000026f0| 61 73 74 78 29 29 2c 20 | 46 49 52 53 54 5f 58 5f |astx)), |FIRST_X_|
|00002700| 41 58 49 53 29 29 3b 0a | 09 20 20 20 20 7d 20 65 |AXIS));.|. } e|
|00002710| 6c 73 65 20 7b 0a 09 09 | 66 70 72 69 6e 74 66 28 |lse {...|fprintf(|
|00002720| 67 70 6f 75 74 66 69 6c | 65 2c 20 22 20 7b 7d 22 |gpoutfil|e, " {}"|
|00002730| 29 3b 0a 09 20 20 20 20 | 7d 0a 09 20 20 20 20 69 |);.. |}.. i|
|00002740| 66 20 28 6c 6f 67 5f 61 | 72 72 61 79 5b 46 49 52 |f (log_a|rray[FIR|
|00002750| 53 54 5f 59 5f 41 58 49 | 53 5d 29 20 7b 0a 09 09 |ST_Y_AXI|S]) {...|
|00002760| 66 70 72 69 6e 74 66 28 | 67 70 6f 75 74 66 69 6c |fprintf(|gpoutfil|
|00002770| 65 2c 20 22 20 25 66 22 | 2c 0a 09 09 09 54 4b 5f |e, " %f"|,....TK_|
|00002780| 52 45 41 4c 5f 56 41 4c | 55 45 28 54 4b 5f 59 5f |REAL_VAL|UE(TK_Y_|
|00002790| 56 41 4c 55 45 28 30 2e | 35 20 2a 20 28 79 20 2b |VALUE(0.|5 * (y +|
|000027a0| 20 74 6b 5f 6c 61 73 74 | 79 29 29 2c 20 46 49 52 | tk_last|y)), FIR|
|000027b0| 53 54 5f 59 5f 41 58 49 | 53 29 29 3b 0a 09 20 20 |ST_Y_AXI|S));.. |
|000027c0| 20 20 7d 20 65 6c 73 65 | 20 7b 0a 09 09 66 70 72 | } else| {...fpr|
|000027d0| 69 6e 74 66 28 67 70 6f | 75 74 66 69 6c 65 2c 20 |intf(gpo|utfile, |
|000027e0| 22 20 7b 7d 22 29 3b 0a | 09 20 20 20 20 7d 0a 09 |" {}");.|. }..|
|000027f0| 20 20 20 20 69 66 20 28 | 6c 6f 67 5f 61 72 72 61 | if (|log_arra|
|00002800| 79 5b 53 45 43 4f 4e 44 | 5f 58 5f 41 58 49 53 5d |y[SECOND|_X_AXIS]|
|00002810| 29 20 7b 0a 09 09 66 70 | 72 69 6e 74 66 28 67 70 |) {...fp|rintf(gp|
|00002820| 6f 75 74 66 69 6c 65 2c | 20 22 20 25 66 22 2c 0a |outfile,| " %f",.|
|00002830| 09 09 09 54 4b 5f 52 45 | 41 4c 5f 56 41 4c 55 45 |...TK_RE|AL_VALUE|
|00002840| 28 54 4b 5f 58 5f 56 41 | 4c 55 45 28 30 2e 35 20 |(TK_X_VA|LUE(0.5 |
|00002850| 2a 20 28 78 20 2b 20 74 | 6b 5f 6c 61 73 74 78 29 |* (x + t|k_lastx)|
|00002860| 29 2c 20 53 45 43 4f 4e | 44 5f 58 5f 41 58 49 53 |), SECON|D_X_AXIS|
|00002870| 29 29 3b 0a 09 20 20 20 | 20 7d 20 65 6c 73 65 20 |));.. | } else |
|00002880| 7b 0a 09 09 66 70 72 69 | 6e 74 66 28 67 70 6f 75 |{...fpri|ntf(gpou|
|00002890| 74 66 69 6c 65 2c 20 22 | 20 7b 7d 22 29 3b 0a 09 |tfile, "| {}");..|
|000028a0| 20 20 20 20 7d 0a 09 20 | 20 20 20 69 66 20 28 6c | }.. | if (l|
|000028b0| 6f 67 5f 61 72 72 61 79 | 5b 53 45 43 4f 4e 44 5f |og_array|[SECOND_|
|000028c0| 59 5f 41 58 49 53 5d 29 | 20 7b 0a 09 09 66 70 72 |Y_AXIS])| {...fpr|
|000028d0| 69 6e 74 66 28 67 70 6f | 75 74 66 69 6c 65 2c 20 |intf(gpo|utfile, |
|000028e0| 22 20 25 66 22 2c 0a 09 | 09 09 54 4b 5f 52 45 41 |" %f",..|..TK_REA|
|000028f0| 4c 5f 56 41 4c 55 45 28 | 54 4b 5f 59 5f 56 41 4c |L_VALUE(|TK_Y_VAL|
|00002900| 55 45 28 30 2e 35 20 2a | 20 28 79 20 2b 20 74 6b |UE(0.5 *| (y + tk|
|00002910| 5f 6c 61 73 74 79 29 29 | 2c 20 53 45 43 4f 4e 44 |_lasty))|, SECOND|
|00002920| 5f 59 5f 41 58 49 53 29 | 29 3b 0a 09 20 20 20 20 |_Y_AXIS)|);.. |
|00002930| 7d 20 65 6c 73 65 20 7b | 0a 09 09 66 70 72 69 6e |} else {|...fprin|
|00002940| 74 66 28 67 70 6f 75 74 | 66 69 6c 65 2c 20 22 20 |tf(gpout|file, " |
|00002950| 7b 7d 22 29 3b 0a 09 20 | 20 20 20 7d 0a 09 20 20 |{}");.. | }.. |
|00002960| 20 20 66 70 72 69 6e 74 | 66 28 67 70 6f 75 74 66 | fprint|f(gpoutf|
|00002970| 69 6c 65 2c 20 22 5c 22 | 5c 6e 22 29 3b 0a 09 7d |ile, "\"|\n");..}|
|00002980| 0a 20 20 20 20 7d 20 65 | 6c 73 65 20 7b 0a 09 69 |. } e|lse {..i|
|00002990| 66 20 28 74 6b 5f 70 65 | 72 6c 29 20 7b 0a 09 20 |f (tk_pe|rl) {.. |
|000029a0| 20 20 20 66 70 72 69 6e | 74 66 28 67 70 6f 75 74 | fprin|tf(gpout|
|000029b0| 66 69 6c 65 2c 20 22 3b | 5c 6e 22 29 3b 0a 09 7d |file, ";|\n");..}|
|000029c0| 0a 20 20 20 20 7d 0a 09 | 2f 2a 0a 09 20 2a 20 65 |. }..|/*.. * e|
|000029d0| 6e 64 20 6f 66 20 74 68 | 65 20 77 72 61 70 70 65 |nd of th|e wrappe|
|000029e0| 72 0a 09 20 2a 2f 0a 20 | 20 20 20 74 6b 5f 6c 61 |r.. */. | tk_la|
|000029f0| 73 74 78 20 3d 20 78 3b | 0a 20 20 20 20 74 6b 5f |stx = x;|. tk_|
|00002a00| 6c 61 73 74 79 20 3d 20 | 79 3b 0a 7d 0a 0a 23 75 |lasty = |y;.}..#u|
|00002a10| 6e 64 65 66 20 54 4b 5f | 52 45 41 4c 5f 56 41 4c |ndef TK_|REAL_VAL|
|00002a20| 55 45 0a 23 75 6e 64 65 | 66 20 54 4b 5f 58 5f 56 |UE.#unde|f TK_X_V|
|00002a30| 41 4c 55 45 0a 23 75 6e | 64 65 66 20 54 4b 5f 59 |ALUE.#un|def TK_Y|
|00002a40| 5f 56 41 4c 55 45 0a 0a | 54 45 52 4d 5f 50 55 42 |_VALUE..|TERM_PUB|
|00002a50| 4c 49 43 20 76 6f 69 64 | 0a 54 4b 5f 70 75 74 5f |LIC void|.TK_put_|
|00002a60| 74 65 78 74 28 78 2c 20 | 79 2c 20 73 74 72 29 0a |text(x, |y, str).|
|00002a70| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 78 2c 20 |unsigned| int x, |
|00002a80| 79 3b 0a 63 68 61 72 20 | 2a 73 74 72 3b 0a 7b 0a |y;.char |*str;.{.|
|00002a90| 20 20 20 20 79 20 3d 20 | 31 30 30 30 20 2d 20 79 | y = |1000 - y|
|00002aa0| 3b 0a 20 20 20 20 69 66 | 20 28 74 6b 5f 70 65 72 |;. if| (tk_per|
|00002ab0| 6c 29 20 7b 0a 09 66 70 | 72 69 6e 74 66 28 67 70 |l) {..fp|rintf(gp|
|00002ac0| 6f 75 74 66 69 6c 65 2c | 22 5c 0a 24 63 61 6e 2d |outfile,|"\.$can-|
|00002ad0| 3e 63 72 65 61 74 65 54 | 65 78 74 28 5c 0a 24 63 |>createT|ext(\.$c|
|00002ae0| 6d 78 20 2a 20 25 64 20 | 2f 20 31 30 30 30 2c 20 |mx * %d |/ 1000, |
|00002af0| 5c 0a 24 63 6d 79 20 2a | 20 25 64 20 2f 20 31 30 |\.$cmy *| %d / 10|
|00002b00| 30 30 2c 20 5c 0a 2d 74 | 65 78 74 20 3d 3e 20 71 |00, \.-t|ext => q|
|00002b10| 7b 25 73 7d 2c 20 2d 66 | 69 6c 6c 20 3d 3e 20 71 |{%s}, -f|ill => q|
|00002b20| 7b 25 73 7d 2c 20 2d 61 | 6e 63 68 6f 72 20 3d 3e |{%s}, -a|nchor =>|
|00002b30| 20 27 25 73 27 2c 20 5c | 0a 28 64 65 66 69 6e 65 | '%s', \|.(define|
|00002b40| 64 20 24 66 6f 6e 74 20 | 3f 20 28 2d 66 6f 6e 74 |d $font |? (-font|
|00002b50| 20 3d 3e 20 24 66 6f 6e | 74 29 20 3a 20 28 29 29 | => $fon|t) : ())|
|00002b60| 29 3b 5c 6e 22 2c 0a 09 | 09 78 2c 20 79 2c 20 73 |);\n",..|.x, y, s|
|00002b70| 74 72 2c 20 74 6b 5f 63 | 6f 6c 6f 72 73 5b 74 6b |tr, tk_c|olors[tk|
|00002b80| 5f 63 6f 6c 6f 72 5d 2c | 20 74 6b 5f 61 6e 63 68 |_color],| tk_anch|
|00002b90| 6f 72 29 3b 0a 20 20 20 | 20 7d 20 65 6c 73 65 20 |or);. | } else |
|00002ba0| 7b 0a 09 66 70 72 69 6e | 74 66 28 67 70 6f 75 74 |{..fprin|tf(gpout|
|00002bb0| 66 69 6c 65 2c 22 5c 0a | 65 76 61 6c 20 24 63 61 |file,"\.|eval $ca|
|00002bc0| 6e 20 63 72 65 61 74 65 | 20 74 65 78 74 20 5c 0a |n create| text \.|
|00002bd0| 5b 65 78 70 72 20 24 63 | 6d 78 20 2a 20 25 64 20 |[expr $c|mx * %d |
|00002be0| 2f 31 30 30 30 5d 20 5c | 0a 5b 65 78 70 72 20 24 |/1000] \|.[expr $|
|00002bf0| 63 6d 79 20 2a 20 25 64 | 20 2f 31 30 30 30 5d 20 |cmy * %d| /1000] |
|00002c00| 5c 0a 2d 74 65 78 74 20 | 5c 5c 7b 25 73 5c 5c 7d |\.-text |\\{%s\\}|
|00002c10| 20 2d 66 69 6c 6c 20 25 | 73 20 2d 61 6e 63 68 6f | -fill %|s -ancho|
|00002c20| 72 20 25 73 5c 0a 20 5b | 65 78 70 72 20 5b 69 6e |r %s\. [|expr [in|
|00002c30| 66 6f 20 65 78 69 73 74 | 73 20 66 6f 6e 74 5d 3f |fo exist|s font]?|
|00002c40| 5c 22 2d 66 6f 6e 74 20 | 5c 5c 24 66 6f 6e 74 5c |\"-font |\\$font\|
|00002c50| 22 3a 7b 7d 5d 5c 6e 22 | 2c 0a 09 09 78 2c 20 79 |":{}]\n"|,...x, y|
|00002c60| 2c 20 73 74 72 2c 20 74 | 6b 5f 63 6f 6c 6f 72 73 |, str, t|k_colors|
|00002c70| 5b 74 6b 5f 63 6f 6c 6f | 72 5d 2c 20 74 6b 5f 61 |[tk_colo|r], tk_a|
|00002c80| 6e 63 68 6f 72 29 3b 0a | 20 20 20 20 7d 0a 7d 0a |nchor);.| }.}.|
|00002c90| 0a 54 45 52 4d 5f 50 55 | 42 4c 49 43 20 69 6e 74 |.TERM_PU|BLIC int|
|00002ca0| 0a 54 4b 5f 6a 75 73 74 | 69 66 79 5f 74 65 78 74 |.TK_just|ify_text|
|00002cb0| 28 61 6e 63 68 6f 72 29 | 0a 65 6e 75 6d 20 4a 55 |(anchor)|.enum JU|
|00002cc0| 53 54 49 46 59 20 61 6e | 63 68 6f 72 3b 0a 7b 0a |STIFY an|chor;.{.|
|00002cd0| 20 20 20 20 69 6e 74 20 | 72 65 74 75 72 6e 5f 76 | int |return_v|
|00002ce0| 61 6c 75 65 3b 0a 0a 20 | 20 20 20 73 77 69 74 63 |alue;.. | switc|
|00002cf0| 68 20 28 61 6e 63 68 6f | 72 29 20 7b 0a 20 20 20 |h (ancho|r) {. |
|00002d00| 20 63 61 73 65 20 52 49 | 47 48 54 3a 0a 09 73 74 | case RI|GHT:..st|
|00002d10| 72 63 70 79 28 74 6b 5f | 61 6e 63 68 6f 72 2c 20 |rcpy(tk_|anchor, |
|00002d20| 22 65 22 29 3b 0a 09 72 | 65 74 75 72 6e 5f 76 61 |"e");..r|eturn_va|
|00002d30| 6c 75 65 20 3d 20 54 52 | 55 45 3b 0a 09 62 72 65 |lue = TR|UE;..bre|
|00002d40| 61 6b 3b 0a 20 20 20 20 | 63 61 73 65 20 43 45 4e |ak;. |case CEN|
|00002d50| 54 52 45 3a 0a 09 73 74 | 72 63 70 79 28 74 6b 5f |TRE:..st|rcpy(tk_|
|00002d60| 61 6e 63 68 6f 72 2c 20 | 22 63 65 6e 74 65 72 22 |anchor, |"center"|
|00002d70| 29 3b 0a 09 72 65 74 75 | 72 6e 5f 76 61 6c 75 65 |);..retu|rn_value|
|00002d80| 20 3d 20 54 52 55 45 3b | 0a 09 62 72 65 61 6b 3b | = TRUE;|..break;|
|00002d90| 0a 20 20 20 20 63 61 73 | 65 20 4c 45 46 54 3a 0a |. cas|e LEFT:.|
|00002da0| 09 73 74 72 63 70 79 28 | 74 6b 5f 61 6e 63 68 6f |.strcpy(|tk_ancho|
|00002db0| 72 2c 20 22 77 22 29 3b | 0a 09 72 65 74 75 72 6e |r, "w");|..return|
|00002dc0| 5f 76 61 6c 75 65 20 3d | 20 54 52 55 45 3b 0a 09 |_value =| TRUE;..|
|00002dd0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 64 65 66 61 75 |break;. | defau|
|00002de0| 6c 74 3a 0a 09 73 74 72 | 63 70 79 28 74 6b 5f 61 |lt:..str|cpy(tk_a|
|00002df0| 6e 63 68 6f 72 2c 20 22 | 77 22 29 3b 0a 09 72 65 |nchor, "|w");..re|
|00002e00| 74 75 72 6e 5f 76 61 6c | 75 65 20 3d 20 46 41 4c |turn_val|ue = FAL|
|00002e10| 53 45 3b 0a 20 20 20 20 | 7d 0a 20 20 20 20 72 65 |SE;. |}. re|
|00002e20| 74 75 72 6e 20 72 65 74 | 75 72 6e 5f 76 61 6c 75 |turn ret|urn_valu|
|00002e30| 65 3b 0a 7d 0a 0a 54 45 | 52 4d 5f 50 55 42 4c 49 |e;.}..TE|RM_PUBLI|
|00002e40| 43 20 69 6e 74 0a 54 4b | 5f 73 65 74 5f 66 6f 6e |C int.TK|_set_fon|
|00002e50| 74 28 66 6f 6e 74 29 0a | 63 68 61 72 20 2a 66 6f |t(font).|char *fo|
|00002e60| 6e 74 3b 0a 7b 0a 20 20 | 20 20 69 66 20 28 21 66 |nt;.{. | if (!f|
|00002e70| 6f 6e 74 20 7c 7c 20 2a | 66 6f 6e 74 20 3d 3d 20 |ont || *|font == |
|00002e80| 4e 55 4c 29 20 7b 0a 09 | 69 66 20 28 74 6b 5f 70 |NUL) {..|if (tk_p|
|00002e90| 65 72 6c 29 0a 09 20 20 | 20 20 66 70 75 74 73 28 |erl).. | fputs(|
|00002ea0| 22 75 6e 64 65 66 20 24 | 66 6f 6e 74 3b 5c 6e 22 |"undef $|font;\n"|
|00002eb0| 2c 20 67 70 6f 75 74 66 | 69 6c 65 29 3b 0a 09 65 |, gpoutf|ile);..e|
|00002ec0| 6c 73 65 0a 09 20 20 20 | 20 66 70 75 74 73 28 22 |lse.. | fputs("|
|00002ed0| 63 61 74 63 68 20 7b 75 | 6e 73 65 74 20 24 66 6f |catch {u|nset $fo|
|00002ee0| 6e 74 7d 5c 6e 22 2c 20 | 67 70 6f 75 74 66 69 6c |nt}\n", |gpoutfil|
|00002ef0| 65 29 3b 0a 20 20 20 20 | 7d 20 65 6c 73 65 20 7b |e);. |} else {|
|00002f00| 0a 09 63 68 61 72 20 2a | 6e 61 6d 65 3b 0a 09 69 |..char *|name;..i|
|00002f10| 6e 74 20 73 69 7a 65 20 | 3d 20 30 3b 0a 09 73 69 |nt size |= 0;..si|
|00002f20| 7a 65 5f 74 20 73 65 70 | 20 3d 20 73 74 72 63 73 |ze_t sep| = strcs|
|00002f30| 70 6e 28 66 6f 6e 74 2c | 20 22 2c 22 29 3b 0a 0a |pn(font,| ",");..|
|00002f40| 09 6e 61 6d 65 20 3d 20 | 6d 61 6c 6c 6f 63 28 73 |.name = |malloc(s|
|00002f50| 65 70 20 2b 20 31 29 3b | 0a 09 69 66 20 28 21 6e |ep + 1);|..if (!n|
|00002f60| 61 6d 65 29 0a 09 20 20 | 20 20 72 65 74 75 72 6e |ame).. | return|
|00002f70| 20 46 41 4c 53 45 3b 0a | 09 73 74 72 6e 63 70 79 | FALSE;.|.strncpy|
|00002f80| 28 6e 61 6d 65 2c 20 66 | 6f 6e 74 2c 20 73 65 70 |(name, f|ont, sep|
|00002f90| 29 3b 0a 09 6e 61 6d 65 | 5b 73 65 70 5d 20 3d 20 |);..name|[sep] = |
|00002fa0| 4e 55 4c 3b 0a 09 69 66 | 20 28 73 65 70 20 3c 20 |NUL;..if| (sep < |
|00002fb0| 73 74 72 6c 65 6e 28 66 | 6f 6e 74 29 29 0a 09 20 |strlen(f|ont)).. |
|00002fc0| 20 20 20 73 73 63 61 6e | 66 28 26 28 66 6f 6e 74 | sscan|f(&(font|
|00002fd0| 5b 73 65 70 20 2b 20 31 | 5d 29 2c 20 22 25 64 22 |[sep + 1|]), "%d"|
|00002fe0| 2c 20 26 73 69 7a 65 29 | 3b 0a 09 69 66 20 28 74 |, &size)|;..if (t|
|00002ff0| 6b 5f 70 65 72 6c 29 20 | 7b 0a 09 20 20 20 20 66 |k_perl) |{.. f|
|00003000| 70 72 69 6e 74 66 28 67 | 70 6f 75 74 66 69 6c 65 |printf(g|poutfile|
|00003010| 2c 22 5c 0a 69 66 20 28 | 24 63 61 6e 2d 3e 63 61 |,"\.if (|$can->ca|
|00003020| 6e 28 27 66 6f 6e 74 43 | 72 65 61 74 65 27 29 29 |n('fontC|reate'))|
|00003030| 20 7b 5c 6e 5c 0a 24 66 | 6f 6e 74 20 3d 20 24 63 | {\n\.$f|ont = $c|
|00003040| 61 6e 2d 3e 66 6f 6e 74 | 43 72 65 61 74 65 28 2d |an->font|Create(-|
|00003050| 66 61 6d 69 6c 79 20 3d | 3e 20 71 7b 25 73 7d 22 |family =|> q{%s}"|
|00003060| 2c 0a 09 09 20 20 20 20 | 6e 61 6d 65 29 3b 0a 09 |,... |name);..|
|00003070| 20 20 20 20 69 66 20 28 | 73 69 7a 65 29 0a 09 09 | if (|size)...|
|00003080| 66 70 72 69 6e 74 66 28 | 67 70 6f 75 74 66 69 6c |fprintf(|gpoutfil|
|00003090| 65 2c 20 22 2c 20 2d 73 | 69 7a 65 20 3d 3e 20 25 |e, ", -s|ize => %|
|000030a0| 64 22 2c 20 73 69 7a 65 | 29 3b 0a 09 20 20 20 20 |d", size|);.. |
|000030b0| 66 70 75 74 73 28 22 29 | 3b 5c 6e 7d 5c 6e 22 2c |fputs(")|;\n}\n",|
|000030c0| 20 67 70 6f 75 74 66 69 | 6c 65 29 3b 0a 09 7d 20 | gpoutfi|le);..} |
|000030d0| 65 6c 73 65 20 7b 0a 09 | 20 20 20 20 66 70 72 69 |else {..| fpri|
|000030e0| 6e 74 66 28 67 70 6f 75 | 74 66 69 6c 65 2c 20 22 |ntf(gpou|tfile, "|
|000030f0| 73 65 74 20 66 6f 6e 74 | 20 5b 66 6f 6e 74 20 63 |set font| [font c|
|00003100| 72 65 61 74 65 20 2d 66 | 61 6d 69 6c 79 20 25 73 |reate -f|amily %s|
|00003110| 22 2c 20 6e 61 6d 65 29 | 3b 0a 09 20 20 20 20 69 |", name)|;.. i|
|00003120| 66 20 28 73 69 7a 65 29 | 0a 09 09 66 70 72 69 6e |f (size)|...fprin|
|00003130| 74 66 28 67 70 6f 75 74 | 66 69 6c 65 2c 20 22 20 |tf(gpout|file, " |
|00003140| 2d 73 69 7a 65 20 25 64 | 22 2c 20 73 69 7a 65 29 |-size %d|", size)|
|00003150| 3b 0a 09 20 20 20 20 66 | 70 75 74 73 28 22 5d 5c |;.. f|puts("]\|
|00003160| 6e 22 2c 20 67 70 6f 75 | 74 66 69 6c 65 29 3b 0a |n", gpou|tfile);.|
|00003170| 09 7d 0a 09 66 72 65 65 | 28 6e 61 6d 65 29 3b 0a |.}..free|(name);.|
|00003180| 20 20 20 20 7d 0a 20 20 | 20 20 72 65 74 75 72 6e | }. | return|
|00003190| 20 54 52 55 45 3b 0a 7d | 0a 0a 54 45 52 4d 5f 50 | TRUE;.}|..TERM_P|
|000031a0| 55 42 4c 49 43 20 76 6f | 69 64 0a 54 4b 5f 74 65 |UBLIC vo|id.TK_te|
|000031b0| 78 74 28 29 0a 7b 0a 09 | 2f 2a 0a 09 2a 20 77 68 |xt().{..|/*..* wh|
|000031c0| 65 6e 20 73 77 69 74 63 | 68 69 6e 67 20 62 61 63 |en switc|hing bac|
|000031d0| 6b 20 74 6f 20 74 65 78 | 74 20 6d 6f 64 65 20 73 |k to tex|t mode s|
|000031e0| 6f 6d 65 20 70 72 6f 63 | 65 64 75 72 65 73 20 61 |ome proc|edures a|
|000031f0| 72 65 20 67 65 6e 65 72 | 61 74 65 64 20 77 68 69 |re gener|ated whi|
|00003200| 63 68 0a 09 2a 20 72 65 | 74 75 72 6e 20 69 6d 70 |ch..* re|turn imp|
|00003210| 6f 72 74 61 6e 74 20 69 | 6e 66 6f 72 6d 61 74 69 |ortant i|nformati|
|00003220| 6f 6e 20 61 62 6f 75 74 | 20 70 6c 6f 74 61 72 65 |on about| plotare|
|00003230| 61 20 73 69 7a 65 20 61 | 6e 64 20 61 78 69 73 20 |a size a|nd axis |
|00003240| 72 61 6e 67 65 73 3a 0a | 09 2a 20 27 67 6e 75 70 |ranges:.|.* 'gnup|
|00003250| 6c 6f 74 5f 70 6c 6f 74 | 61 72 65 61 27 20 72 65 |lot_plot|area' re|
|00003260| 74 75 72 6e 73 20 74 68 | 65 20 70 6c 6f 74 61 72 |turns th|e plotar|
|00003270| 65 61 20 73 69 7a 65 20 | 69 6e 20 74 6b 63 61 6e |ea size |in tkcan|
|00003280| 76 61 73 20 75 6e 69 74 | 73 0a 09 2a 20 27 67 6e |vas unit|s..* 'gn|
|00003290| 75 70 6c 6f 74 5f 61 78 | 69 73 72 61 6e 67 65 73 |uplot_ax|isranges|
|000032a0| 27 20 72 65 74 75 72 6e | 73 20 74 68 65 20 6d 69 |' return|s the mi|
|000032b0| 6e 2e 20 61 6e 64 20 6d | 61 78 2e 20 76 61 6c 75 |n. and m|ax. valu|
|000032c0| 65 73 20 6f 66 20 74 68 | 65 20 61 78 69 73 0a 09 |es of th|e axis..|
|000032d0| 2a 20 74 68 65 73 65 20 | 61 72 65 20 65 73 73 65 |* these |are esse|
|000032e0| 6e 74 69 61 6c 6c 79 20 | 6e 65 65 64 65 64 20 74 |ntially |needed t|
|000032f0| 6f 20 73 65 74 20 74 68 | 65 20 73 69 7a 65 20 6f |o set th|e size o|
|00003300| 66 20 74 68 65 20 63 61 | 6e 76 61 73 20 77 68 65 |f the ca|nvas whe|
|00003310| 6e 20 74 68 65 0a 09 2a | 20 61 78 69 73 20 73 63 |n the..*| axis sc|
|00003320| 61 6c 69 6e 67 20 69 73 | 20 69 6d 70 6f 72 74 61 |aling is| importa|
|00003330| 6e 74 2e 0a 09 2a 20 6d | 6f 72 65 6f 76 65 72 2c |nt...* m|oreover,|
|00003340| 20 61 20 70 72 6f 63 65 | 64 75 72 65 20 27 67 6e | a proce|dure 'gn|
|00003350| 75 70 6c 6f 74 5f 78 79 | 27 20 69 73 20 63 72 65 |uplot_xy|' is cre|
|00003360| 61 74 65 64 20 77 68 69 | 63 68 20 63 6f 6e 74 61 |ated whi|ch conta|
|00003370| 69 6e 73 20 74 68 65 0a | 09 2a 20 61 63 74 69 6f |ins the.|.* actio|
|00003380| 6e 73 20 62 6f 75 6e 64 | 20 74 6f 20 6c 69 6e 65 |ns bound| to line|
|00003390| 20 73 65 67 6d 65 6e 74 | 73 20 28 73 65 65 20 74 | segment|s (see t|
|000033a0| 68 65 20 61 62 6f 76 65 | 20 27 54 4b 5f 76 65 63 |he above| 'TK_vec|
|000033b0| 74 6f 72 27 20 63 6f 64 | 65 29 3a 0a 09 2a 20 69 |tor' cod|e):..* i|
|000033c0| 66 20 74 68 65 20 75 73 | 65 72 20 68 61 73 20 64 |f the us|er has d|
|000033d0| 65 66 69 6e 65 64 20 61 | 20 70 72 6f 63 65 64 75 |efined a| procedu|
|000033e0| 72 65 20 6e 61 6d 65 64 | 20 27 75 73 65 72 5f 67 |re named| 'user_g|
|000033f0| 6e 75 70 6c 6f 74 5f 63 | 6f 6f 72 64 69 6e 61 74 |nuplot_c|oordinat|
|00003400| 65 73 27 0a 09 2a 20 74 | 68 65 6e 20 27 67 6e 75 |es'..* t|hen 'gnu|
|00003410| 70 6c 6f 74 5f 78 79 27 | 20 63 61 6c 6c 73 20 74 |plot_xy'| calls t|
|00003420| 68 69 73 20 70 72 6f 63 | 65 64 75 72 65 2c 20 6f |his proc|edure, o|
|00003430| 74 68 65 72 77 69 73 65 | 20 69 73 20 77 72 69 74 |therwise| is writ|
|00003440| 65 73 20 74 68 65 0a 09 | 2a 20 63 6f 6f 72 64 69 |es the..|* coordi|
|00003450| 6e 61 74 65 73 20 6f 66 | 20 74 68 65 20 6c 69 6e |nates of| the lin|
|00003460| 65 20 73 65 67 6d 65 6e | 74 20 74 68 65 20 6d 6f |e segmen|t the mo|
|00003470| 75 73 65 20 63 75 72 73 | 6f 72 20 69 73 20 70 6f |use curs|or is po|
|00003480| 69 6e 74 69 6e 67 20 74 | 6f 0a 09 2a 20 74 6f 20 |inting t|o..* to |
|00003490| 73 74 61 6e 64 61 72 64 | 20 6f 75 74 70 75 74 2e |standard| output.|
|000034a0| 0a 09 2a 2f 0a 20 20 20 | 20 69 66 20 28 74 6b 5f |..*/. | if (tk_|
|000034b0| 70 65 72 6c 29 20 7b 0a | 09 66 70 75 74 73 28 22 |perl) {.|.fputs("|
|000034c0| 7d 3b 5c 6e 22 2c 20 67 | 70 6f 75 74 66 69 6c 65 |};\n", g|poutfile|
|000034d0| 29 3b 0a 09 69 66 20 28 | 21 69 73 5f 33 64 5f 70 |);..if (|!is_3d_p|
|000034e0| 6c 6f 74 29 20 7b 0a 09 | 20 20 20 20 66 70 75 74 |lot) {..| fput|
|000034f0| 73 28 22 73 75 62 20 67 | 6e 75 70 6c 6f 74 5f 70 |s("sub g|nuplot_p|
|00003500| 6c 6f 74 61 72 65 61 20 | 7b 5c 6e 22 2c 20 67 70 |lotarea |{\n", gp|
|00003510| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 20 20 20 20 66 |outfile)|;.. f|
|00003520| 70 72 69 6e 74 66 28 67 | 70 6f 75 74 66 69 6c 65 |printf(g|poutfile|
|00003530| 2c 0a 09 09 20 20 20 20 | 22 72 65 74 75 72 6e 20 |,... |"return |
|00003540| 28 25 64 2c 20 25 64 2c | 20 25 64 2c 20 25 64 29 |(%d, %d,| %d, %d)|
|00003550| 3b 5c 6e 22 2c 0a 09 09 | 20 20 20 20 78 6c 65 66 |;\n",...| xlef|
|00003560| 74 2c 20 78 72 69 67 68 | 74 2c 20 31 30 30 30 20 |t, xrigh|t, 1000 |
|00003570| 2d 20 79 74 6f 70 2c 20 | 31 30 30 30 20 2d 20 79 |- ytop, |1000 - y|
|00003580| 62 6f 74 29 3b 0a 09 20 | 20 20 20 66 70 75 74 73 |bot);.. | fputs|
|00003590| 28 22 7d 3b 5c 6e 22 2c | 20 67 70 6f 75 74 66 69 |("};\n",| gpoutfi|
|000035a0| 6c 65 29 3b 0a 09 20 20 | 20 20 66 70 75 74 73 28 |le);.. | fputs(|
|000035b0| 22 73 75 62 20 67 6e 75 | 70 6c 6f 74 5f 61 78 69 |"sub gnu|plot_axi|
|000035c0| 73 72 61 6e 67 65 73 20 | 7b 5c 6e 22 2c 20 67 70 |sranges |{\n", gp|
|000035d0| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 20 20 20 20 66 |outfile)|;.. f|
|000035e0| 70 72 69 6e 74 66 28 67 | 70 6f 75 74 66 69 6c 65 |printf(g|poutfile|
|000035f0| 2c 0a 09 09 20 20 20 20 | 22 72 65 74 75 72 6e 20 |,... |"return |
|00003600| 28 25 66 2c 20 25 66 2c | 20 25 66 2c 20 25 66 2c |(%f, %f,| %f, %f,|
|00003610| 20 25 66 2c 20 25 66 2c | 20 25 66 2c 20 25 66 29 | %f, %f,| %f, %f)|
|00003620| 3b 5c 6e 22 2c 0a 09 09 | 20 20 20 20 6d 69 6e 5f |;\n",...| min_|
|00003630| 61 72 72 61 79 5b 46 49 | 52 53 54 5f 58 5f 41 58 |array[FI|RST_X_AX|
|00003640| 49 53 5d 2c 20 6d 61 78 | 5f 61 72 72 61 79 5b 46 |IS], max|_array[F|
|00003650| 49 52 53 54 5f 58 5f 41 | 58 49 53 5d 2c 0a 09 09 |IRST_X_A|XIS],...|
|00003660| 20 20 20 20 6d 69 6e 5f | 61 72 72 61 79 5b 46 49 | min_|array[FI|
|00003670| 52 53 54 5f 59 5f 41 58 | 49 53 5d 2c 20 6d 61 78 |RST_Y_AX|IS], max|
|00003680| 5f 61 72 72 61 79 5b 46 | 49 52 53 54 5f 59 5f 41 |_array[F|IRST_Y_A|
|00003690| 58 49 53 5d 2c 0a 09 09 | 20 20 20 20 6d 69 6e 5f |XIS],...| min_|
|000036a0| 61 72 72 61 79 5b 53 45 | 43 4f 4e 44 5f 58 5f 41 |array[SE|COND_X_A|
|000036b0| 58 49 53 5d 2c 20 6d 61 | 78 5f 61 72 72 61 79 5b |XIS], ma|x_array[|
|000036c0| 53 45 43 4f 4e 44 5f 58 | 5f 41 58 49 53 5d 2c 0a |SECOND_X|_AXIS],.|
|000036d0| 09 09 20 20 20 20 6d 69 | 6e 5f 61 72 72 61 79 5b |.. mi|n_array[|
|000036e0| 53 45 43 4f 4e 44 5f 59 | 5f 41 58 49 53 5d 2c 20 |SECOND_Y|_AXIS], |
|000036f0| 6d 61 78 5f 61 72 72 61 | 79 5b 53 45 43 4f 4e 44 |max_arra|y[SECOND|
|00003700| 5f 59 5f 41 58 49 53 5d | 29 3b 0a 09 20 20 20 20 |_Y_AXIS]|);.. |
|00003710| 66 70 75 74 73 28 22 7d | 3b 5c 6e 22 2c 20 67 70 |fputs("}|;\n", gp|
|00003720| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 20 20 20 20 69 |outfile)|;.. i|
|00003730| 66 20 28 74 6b 5f 69 6e | 74 65 72 61 63 74 69 76 |f (tk_in|teractiv|
|00003740| 65 29 20 7b 0a 09 09 66 | 70 75 74 73 28 22 73 75 |e) {...f|puts("su|
|00003750| 62 20 67 6e 75 70 6c 6f | 74 5f 78 79 20 7b 5c 6e |b gnuplo|t_xy {\n|
|00003760| 22 2c 0a 09 09 20 20 20 | 20 20 20 67 70 6f 75 74 |",... | gpout|
|00003770| 66 69 6c 65 29 3b 0a 09 | 09 66 70 75 74 73 28 22 |file);..|.fputs("|
|00003780| 6d 79 20 28 24 77 69 6e | 2c 20 24 78 31 73 2c 20 |my ($win|, $x1s, |
|00003790| 24 79 31 73 2c 20 24 78 | 32 73 2c 20 24 79 32 73 |$y1s, $x|2s, $y2s|
|000037a0| 2c 20 24 78 31 65 2c 20 | 24 79 31 65 2c 20 24 78 |, $x1e, |$y1e, $x|
|000037b0| 32 65 2c 20 24 79 32 65 | 2c 20 24 78 31 6d 2c 20 |2e, $y2e|, $x1m, |
|000037c0| 24 79 31 6d 2c 20 24 78 | 32 6d 2c 20 24 79 32 6d |$y1m, $x|2m, $y2m|
|000037d0| 29 20 3d 20 40 5f 3b 5c | 6e 22 2c 0a 09 09 20 20 |) = @_;\|n",... |
|000037e0| 20 20 20 20 67 70 6f 75 | 74 66 69 6c 65 29 3b 0a | gpou|tfile);.|
|000037f0| 09 09 66 70 75 74 73 28 | 22 69 66 20 28 64 65 66 |..fputs(|"if (def|
|00003800| 69 6e 65 64 20 26 75 73 | 65 72 5f 67 6e 75 70 6c |ined &us|er_gnupl|
|00003810| 6f 74 5f 63 6f 6f 72 64 | 69 6e 61 74 65 73 29 20 |ot_coord|inates) |
|00003820| 7b 5c 6e 22 2c 0a 09 09 | 20 20 20 20 20 20 67 70 |{\n",...| gp|
|00003830| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 09 66 70 75 74 |outfile)|;...fput|
|00003840| 73 28 22 6d 79 20 24 69 | 64 20 3d 20 24 77 69 6e |s("my $i|d = $win|
|00003850| 2d 3e 66 69 6e 64 28 27 | 77 69 74 68 74 61 67 27 |->find('|withtag'|
|00003860| 2c 20 27 63 75 72 72 65 | 6e 74 27 29 3b 5c 6e 22 |, 'curre|nt');\n"|
|00003870| 2c 0a 09 09 20 20 20 20 | 20 20 67 70 6f 75 74 66 |,... | gpoutf|
|00003880| 69 6c 65 29 3b 0a 09 09 | 66 70 75 74 73 28 22 75 |ile);...|fputs("u|
|00003890| 73 65 72 5f 67 6e 75 70 | 6c 6f 74 5f 63 6f 6f 72 |ser_gnup|lot_coor|
|000038a0| 64 69 6e 61 74 65 73 20 | 24 77 69 6e 2c 20 24 69 |dinates |$win, $i|
|000038b0| 64 2c 20 24 78 31 73 2c | 20 24 79 31 73 2c 20 24 |d, $x1s,| $y1s, $|
|000038c0| 78 32 73 2c 20 24 79 32 | 73 2c 20 24 78 31 65 2c |x2s, $y2|s, $x1e,|
|000038d0| 20 24 79 31 65 2c 20 24 | 78 32 65 2c 20 24 79 32 | $y1e, $|x2e, $y2|
|000038e0| 65 2c 20 24 78 31 6d 2c | 20 24 79 31 6d 2c 20 24 |e, $x1m,| $y1m, $|
|000038f0| 78 32 6d 2c 20 24 79 32 | 6d 5c 6e 22 2c 0a 09 09 |x2m, $y2|m\n",...|
|00003900| 20 20 20 20 20 20 67 70 | 6f 75 74 66 69 6c 65 29 | gp|outfile)|
|00003910| 3b 0a 09 09 66 70 75 74 | 73 28 22 7d 20 65 6c 73 |;...fput|s("} els|
|00003920| 65 20 7b 5c 6e 22 2c 0a | 09 09 20 20 20 20 20 20 |e {\n",.|.. |
|00003930| 67 70 6f 75 74 66 69 6c | 65 29 3b 0a 09 09 66 70 |gpoutfil|e);...fp|
|00003940| 75 74 73 28 22 69 66 20 | 28 6c 65 6e 67 74 68 28 |uts("if |(length(|
|00003950| 24 78 31 6d 29 3e 30 29 | 20 7b 70 72 69 6e 74 20 |$x1m)>0)| {print |
|00003960| 5c 22 20 24 78 31 6d 5c | 22 3b 7d 20 65 6c 73 65 |\" $x1m\|";} else|
|00003970| 20 7b 70 72 69 6e 74 20 | 5c 22 20 5c 22 2c 20 30 | {print |\" \", 0|
|00003980| 2e 35 2a 28 24 78 31 73 | 2b 24 78 31 65 29 3b 7d |.5*($x1s|+$x1e);}|
|00003990| 5c 6e 22 2c 0a 09 09 20 | 20 20 20 20 20 67 70 6f |\n",... | gpo|
|000039a0| 75 74 66 69 6c 65 29 3b | 0a 09 09 66 70 75 74 73 |utfile);|...fputs|
|000039b0| 28 22 69 66 20 28 6c 65 | 6e 67 74 68 28 24 79 31 |("if (le|ngth($y1|
|000039c0| 6d 29 3e 30 29 20 7b 70 | 72 69 6e 74 20 5c 22 20 |m)>0) {p|rint \" |
|000039d0| 24 79 31 6d 5c 22 3b 7d | 20 65 6c 73 65 20 7b 70 |$y1m\";}| else {p|
|000039e0| 72 69 6e 74 20 5c 22 20 | 5c 22 2c 20 30 2e 35 2a |rint \" |\", 0.5*|
|000039f0| 28 24 79 31 73 2b 24 79 | 31 65 29 3b 7d 5c 6e 22 |($y1s+$y|1e);}\n"|
|00003a00| 2c 0a 09 09 20 20 20 20 | 20 20 67 70 6f 75 74 66 |,... | gpoutf|
|00003a10| 69 6c 65 29 3b 0a 09 09 | 66 70 75 74 73 28 22 69 |ile);...|fputs("i|
|00003a20| 66 20 28 6c 65 6e 67 74 | 68 28 24 78 32 6d 29 3e |f (lengt|h($x2m)>|
|00003a30| 30 29 20 7b 70 72 69 6e | 74 20 5c 22 20 24 78 32 |0) {prin|t \" $x2|
|00003a40| 6d 5c 22 3b 7d 20 65 6c | 73 65 20 7b 70 72 69 6e |m\";} el|se {prin|
|00003a50| 74 20 5c 22 20 5c 22 2c | 20 30 2e 35 2a 28 24 78 |t \" \",| 0.5*($x|
|00003a60| 32 73 2b 24 78 32 65 29 | 3b 7d 5c 6e 22 2c 0a 09 |2s+$x2e)|;}\n",..|
|00003a70| 09 20 20 20 20 20 20 67 | 70 6f 75 74 66 69 6c 65 |. g|poutfile|
|00003a80| 29 3b 0a 09 09 66 70 75 | 74 73 28 22 69 66 20 28 |);...fpu|ts("if (|
|00003a90| 6c 65 6e 67 74 68 28 24 | 79 32 6d 29 3e 30 29 20 |length($|y2m)>0) |
|00003aa0| 7b 70 72 69 6e 74 20 5c | 22 20 24 79 32 6d 5c 22 |{print \|" $y2m\"|
|00003ab0| 3b 7d 20 65 6c 73 65 20 | 7b 70 72 69 6e 74 20 5c |;} else |{print \|
|00003ac0| 22 20 5c 22 2c 20 30 2e | 35 2a 28 24 79 32 73 2b |" \", 0.|5*($y2s+|
|00003ad0| 24 79 32 65 29 3b 7d 5c | 6e 22 2c 0a 09 09 20 20 |$y2e);}\|n",... |
|00003ae0| 20 20 20 20 67 70 6f 75 | 74 66 69 6c 65 29 3b 0a | gpou|tfile);.|
|00003af0| 09 09 66 70 75 74 73 28 | 22 70 72 69 6e 74 20 5c |..fputs(|"print \|
|00003b00| 22 5c 5c 6e 5c 22 5c 6e | 22 2c 0a 09 09 20 20 20 |"\\n\"\n|",... |
|00003b10| 20 20 20 67 70 6f 75 74 | 66 69 6c 65 29 3b 0a 09 | gpout|file);..|
|00003b20| 09 66 70 75 74 73 28 22 | 7d 5c 6e 22 2c 0a 09 09 |.fputs("|}\n",...|
|00003b30| 20 20 20 20 20 20 67 70 | 6f 75 74 66 69 6c 65 29 | gp|outfile)|
|00003b40| 3b 0a 09 09 66 70 75 74 | 73 28 22 7d 3b 5c 6e 22 |;...fput|s("};\n"|
|00003b50| 2c 20 67 70 6f 75 74 66 | 69 6c 65 29 3b 0a 09 20 |, gpoutf|ile);.. |
|00003b60| 20 20 20 7d 0a 09 7d 0a | 20 20 20 20 7d 20 65 6c | }..}.| } el|
|00003b70| 73 65 20 7b 0a 09 66 70 | 75 74 73 28 22 7d 5c 6e |se {..fp|uts("}\n|
|00003b80| 22 2c 20 67 70 6f 75 74 | 66 69 6c 65 29 3b 0a 09 |", gpout|file);..|
|00003b90| 69 66 20 28 21 69 73 5f | 33 64 5f 70 6c 6f 74 29 |if (!is_|3d_plot)|
|00003ba0| 20 7b 0a 09 20 20 20 20 | 66 70 75 74 73 28 22 70 | {.. |fputs("p|
|00003bb0| 72 6f 63 20 67 6e 75 70 | 6c 6f 74 5f 70 6c 6f 74 |roc gnup|lot_plot|
|00003bc0| 61 72 65 61 20 7b 7d 20 | 7b 5c 6e 22 2c 20 67 70 |area {} |{\n", gp|
|00003bd0| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 20 20 20 20 66 |outfile)|;.. f|
|00003be0| 70 72 69 6e 74 66 28 67 | 70 6f 75 74 66 69 6c 65 |printf(g|poutfile|
|00003bf0| 2c 0a 09 09 20 20 20 20 | 22 72 65 74 75 72 6e 20 |,... |"return |
|00003c00| 7b 25 64 20 25 64 20 25 | 64 20 25 64 7d 5c 6e 22 |{%d %d %|d %d}\n"|
|00003c10| 2c 0a 09 09 20 20 20 20 | 78 6c 65 66 74 2c 20 78 |,... |xleft, x|
|00003c20| 72 69 67 68 74 2c 20 31 | 30 30 30 20 2d 20 79 74 |right, 1|000 - yt|
|00003c30| 6f 70 2c 20 31 30 30 30 | 20 2d 20 79 62 6f 74 29 |op, 1000| - ybot)|
|00003c40| 3b 0a 09 20 20 20 20 66 | 70 75 74 73 28 22 7d 5c |;.. f|puts("}\|
|00003c50| 6e 22 2c 20 67 70 6f 75 | 74 66 69 6c 65 29 3b 0a |n", gpou|tfile);.|
|00003c60| 09 20 20 20 20 66 70 75 | 74 73 28 22 70 72 6f 63 |. fpu|ts("proc|
|00003c70| 20 67 6e 75 70 6c 6f 74 | 5f 61 78 69 73 72 61 6e | gnuplot|_axisran|
|00003c80| 67 65 73 20 7b 7d 20 7b | 5c 6e 22 2c 20 67 70 6f |ges {} {|\n", gpo|
|00003c90| 75 74 66 69 6c 65 29 3b | 0a 09 20 20 20 20 66 70 |utfile);|.. fp|
|00003ca0| 72 69 6e 74 66 28 67 70 | 6f 75 74 66 69 6c 65 2c |rintf(gp|outfile,|
|00003cb0| 0a 09 09 20 20 20 20 22 | 72 65 74 75 72 6e 20 7b |... "|return {|
|00003cc0| 25 66 20 25 66 20 25 66 | 20 25 66 20 25 66 20 25 |%f %f %f| %f %f %|
|00003cd0| 66 20 25 66 20 25 66 7d | 5c 6e 22 2c 0a 09 09 20 |f %f %f}|\n",... |
|00003ce0| 20 20 20 6d 69 6e 5f 61 | 72 72 61 79 5b 46 49 52 | min_a|rray[FIR|
|00003cf0| 53 54 5f 58 5f 41 58 49 | 53 5d 2c 20 6d 61 78 5f |ST_X_AXI|S], max_|
|00003d00| 61 72 72 61 79 5b 46 49 | 52 53 54 5f 58 5f 41 58 |array[FI|RST_X_AX|
|00003d10| 49 53 5d 2c 0a 09 09 20 | 20 20 20 6d 69 6e 5f 61 |IS],... | min_a|
|00003d20| 72 72 61 79 5b 46 49 52 | 53 54 5f 59 5f 41 58 49 |rray[FIR|ST_Y_AXI|
|00003d30| 53 5d 2c 20 6d 61 78 5f | 61 72 72 61 79 5b 46 49 |S], max_|array[FI|
|00003d40| 52 53 54 5f 59 5f 41 58 | 49 53 5d 2c 0a 09 09 20 |RST_Y_AX|IS],... |
|00003d50| 20 20 20 6d 69 6e 5f 61 | 72 72 61 79 5b 53 45 43 | min_a|rray[SEC|
|00003d60| 4f 4e 44 5f 58 5f 41 58 | 49 53 5d 2c 20 6d 61 78 |OND_X_AX|IS], max|
|00003d70| 5f 61 72 72 61 79 5b 53 | 45 43 4f 4e 44 5f 58 5f |_array[S|ECOND_X_|
|00003d80| 41 58 49 53 5d 2c 0a 09 | 09 20 20 20 20 6d 69 6e |AXIS],..|. min|
|00003d90| 5f 61 72 72 61 79 5b 53 | 45 43 4f 4e 44 5f 59 5f |_array[S|ECOND_Y_|
|00003da0| 41 58 49 53 5d 2c 20 6d | 61 78 5f 61 72 72 61 79 |AXIS], m|ax_array|
|00003db0| 5b 53 45 43 4f 4e 44 5f | 59 5f 41 58 49 53 5d 29 |[SECOND_|Y_AXIS])|
|00003dc0| 3b 0a 09 20 20 20 20 66 | 70 75 74 73 28 22 7d 5c |;.. f|puts("}\|
|00003dd0| 6e 22 2c 20 67 70 6f 75 | 74 66 69 6c 65 29 3b 0a |n", gpou|tfile);.|
|00003de0| 09 20 20 20 20 69 66 20 | 28 74 6b 5f 69 6e 74 65 |. if |(tk_inte|
|00003df0| 72 61 63 74 69 76 65 29 | 20 7b 0a 09 09 66 70 75 |ractive)| {...fpu|
|00003e00| 74 73 28 22 70 72 6f 63 | 20 67 6e 75 70 6c 6f 74 |ts("proc| gnuplot|
|00003e10| 5f 78 79 20 7b 77 69 6e | 20 78 31 73 20 79 31 73 |_xy {win| x1s y1s|
|00003e20| 20 78 32 73 20 79 32 73 | 20 78 31 65 20 79 31 65 | x2s y2s| x1e y1e|
|00003e30| 20 78 32 65 20 79 32 65 | 20 78 31 6d 20 79 31 6d | x2e y2e| x1m y1m|
|00003e40| 20 78 32 6d 20 79 32 6d | 7d 20 7b 5c 6e 22 2c 0a | x2m y2m|} {\n",.|
|00003e50| 09 09 20 20 20 20 20 20 | 67 70 6f 75 74 66 69 6c |.. |gpoutfil|
|00003e60| 65 29 3b 0a 09 09 66 70 | 75 74 73 28 22 69 66 20 |e);...fp|uts("if |
|00003e70| 7b 28 5b 6c 6c 65 6e 67 | 74 68 20 5b 69 6e 66 6f |{([lleng|th [info|
|00003e80| 20 63 6f 6d 6d 61 6e 64 | 73 20 75 73 65 72 5f 67 | command|s user_g|
|00003e90| 6e 75 70 6c 6f 74 5f 63 | 6f 6f 72 64 69 6e 61 74 |nuplot_c|oordinat|
|00003ea0| 65 73 5d 5d 29 7d 20 7b | 5c 6e 22 2c 0a 09 09 20 |es]])} {|\n",... |
|00003eb0| 20 20 20 20 20 67 70 6f | 75 74 66 69 6c 65 29 3b | gpo|utfile);|
|00003ec0| 0a 09 09 66 70 75 74 73 | 28 22 73 65 74 20 69 64 |...fputs|("set id|
|00003ed0| 20 5b 24 77 69 6e 20 66 | 69 6e 64 20 77 69 74 68 | [$win f|ind with|
|00003ee0| 74 61 67 20 63 75 72 72 | 65 6e 74 5d 5c 6e 22 2c |tag curr|ent]\n",|
|00003ef0| 0a 09 09 20 20 20 20 20 | 20 67 70 6f 75 74 66 69 |... | gpoutfi|
|00003f00| 6c 65 29 3b 0a 09 09 66 | 70 75 74 73 28 22 75 73 |le);...f|puts("us|
|00003f10| 65 72 5f 67 6e 75 70 6c | 6f 74 5f 63 6f 6f 72 64 |er_gnupl|ot_coord|
|00003f20| 69 6e 61 74 65 73 20 24 | 77 69 6e 20 24 69 64 20 |inates $|win $id |
|00003f30| 24 78 31 73 20 24 79 31 | 73 20 24 78 32 73 20 24 |$x1s $y1|s $x2s $|
|00003f40| 79 32 73 20 24 78 31 65 | 20 24 79 31 65 20 24 78 |y2s $x1e| $y1e $x|
|00003f50| 32 65 20 24 79 32 65 20 | 24 78 31 6d 20 24 79 31 |2e $y2e |$x1m $y1|
|00003f60| 6d 20 24 78 32 6d 20 24 | 79 32 6d 5c 6e 22 2c 0a |m $x2m $|y2m\n",.|
|00003f70| 09 09 20 20 20 20 20 20 | 67 70 6f 75 74 66 69 6c |.. |gpoutfil|
|00003f80| 65 29 3b 0a 09 09 66 70 | 75 74 73 28 22 7d 20 65 |e);...fp|uts("} e|
|00003f90| 6c 73 65 20 7b 5c 6e 22 | 2c 20 67 70 6f 75 74 66 |lse {\n"|, gpoutf|
|00003fa0| 69 6c 65 29 3b 0a 09 09 | 66 70 75 74 73 28 22 69 |ile);...|fputs("i|
|00003fb0| 66 20 7b 5b 73 74 72 69 | 6e 67 20 6c 65 6e 67 74 |f {[stri|ng lengt|
|00003fc0| 68 20 24 78 31 6d 5d 3e | 30 7d 20 7b 70 75 74 73 |h $x1m]>|0} {puts|
|00003fd0| 20 2d 6e 6f 6e 65 77 6c | 69 6e 65 20 5c 22 20 24 | -nonewl|ine \" $|
|00003fe0| 78 31 6d 5c 22 7d 20 65 | 6c 73 65 20 7b 70 75 74 |x1m\"} e|lse {put|
|00003ff0| 73 20 2d 6e 6f 6e 65 77 | 6c 69 6e 65 20 5c 22 20 |s -nonew|line \" |
|00004000| 5b 65 78 70 72 20 30 2e | 35 2a 28 24 78 31 73 2b |[expr 0.|5*($x1s+|
|00004010| 24 78 31 65 29 5d 5c 22 | 7d 5c 6e 22 2c 0a 09 09 |$x1e)]\"|}\n",...|
|00004020| 20 20 20 20 20 20 67 70 | 6f 75 74 66 69 6c 65 29 | gp|outfile)|
|00004030| 3b 0a 09 09 66 70 75 74 | 73 28 22 69 66 20 7b 5b |;...fput|s("if {[|
|00004040| 73 74 72 69 6e 67 20 6c | 65 6e 67 74 68 20 24 79 |string l|ength $y|
|00004050| 31 6d 5d 3e 30 7d 20 7b | 70 75 74 73 20 2d 6e 6f |1m]>0} {|puts -no|
|00004060| 6e 65 77 6c 69 6e 65 20 | 5c 22 20 24 79 31 6d 5c |newline |\" $y1m\|
|00004070| 22 7d 20 65 6c 73 65 20 | 7b 70 75 74 73 20 2d 6e |"} else |{puts -n|
|00004080| 6f 6e 65 77 6c 69 6e 65 | 20 5c 22 20 5b 65 78 70 |onewline| \" [exp|
|00004090| 72 20 30 2e 35 2a 28 24 | 79 31 73 2b 24 79 31 65 |r 0.5*($|y1s+$y1e|
|000040a0| 29 5d 5c 22 7d 5c 6e 22 | 2c 0a 09 09 20 20 20 20 |)]\"}\n"|,... |
|000040b0| 20 20 67 70 6f 75 74 66 | 69 6c 65 29 3b 0a 09 09 | gpoutf|ile);...|
|000040c0| 66 70 75 74 73 28 22 69 | 66 20 7b 5b 73 74 72 69 |fputs("i|f {[stri|
|000040d0| 6e 67 20 6c 65 6e 67 74 | 68 20 24 78 32 6d 5d 3e |ng lengt|h $x2m]>|
|000040e0| 30 7d 20 7b 70 75 74 73 | 20 2d 6e 6f 6e 65 77 6c |0} {puts| -nonewl|
|000040f0| 69 6e 65 20 5c 22 20 24 | 78 32 6d 5c 22 7d 20 65 |ine \" $|x2m\"} e|
|00004100| 6c 73 65 20 7b 70 75 74 | 73 20 2d 6e 6f 6e 65 77 |lse {put|s -nonew|
|00004110| 6c 69 6e 65 20 5c 22 20 | 5b 65 78 70 72 20 30 2e |line \" |[expr 0.|
|00004120| 35 2a 28 24 78 32 73 2b | 24 78 32 65 29 5d 5c 22 |5*($x2s+|$x2e)]\"|
|00004130| 7d 5c 6e 22 2c 0a 09 09 | 20 20 20 20 20 20 67 70 |}\n",...| gp|
|00004140| 6f 75 74 66 69 6c 65 29 | 3b 0a 09 09 66 70 75 74 |outfile)|;...fput|
|00004150| 73 28 22 69 66 20 7b 5b | 73 74 72 69 6e 67 20 6c |s("if {[|string l|
|00004160| 65 6e 67 74 68 20 24 79 | 32 6d 5d 3e 30 7d 20 7b |ength $y|2m]>0} {|
|00004170| 70 75 74 73 20 5c 22 20 | 24 79 32 6d 5c 22 7d 20 |puts \" |$y2m\"} |
|00004180| 65 6c 73 65 20 7b 70 75 | 74 73 20 5c 22 20 5b 65 |else {pu|ts \" [e|
|00004190| 78 70 72 20 30 2e 35 2a | 28 24 79 32 73 2b 24 79 |xpr 0.5*|($y2s+$y|
|000041a0| 32 65 29 5d 5c 22 7d 5c | 6e 22 2c 0a 09 09 20 20 |2e)]\"}\|n",... |
|000041b0| 20 20 20 20 67 70 6f 75 | 74 66 69 6c 65 29 3b 0a | gpou|tfile);.|
|000041c0| 09 09 66 70 75 74 73 28 | 22 7d 5c 6e 22 2c 20 67 |..fputs(|"}\n", g|
|000041d0| 70 6f 75 74 66 69 6c 65 | 29 3b 0a 09 09 66 70 75 |poutfile|);...fpu|
|000041e0| 74 73 28 22 7d 5c 6e 22 | 2c 20 67 70 6f 75 74 66 |ts("}\n"|, gpoutf|
|000041f0| 69 6c 65 29 3b 0a 09 20 | 20 20 20 7d 0a 09 7d 0a |ile);.. | }..}.|
|00004200| 20 20 20 20 7d 0a 20 20 | 20 20 66 66 6c 75 73 68 | }. | fflush|
|00004210| 28 67 70 6f 75 74 66 69 | 6c 65 29 3b 0a 7d 0a 0a |(gpoutfi|le);.}..|
|00004220| 23 65 6e 64 69 66 20 2f | 2a 20 54 45 52 4d 5f 42 |#endif /|* TERM_B|
|00004230| 4f 44 59 20 2a 2f 0a 0a | 23 69 66 64 65 66 20 54 |ODY */..|#ifdef T|
|00004240| 45 52 4d 5f 54 41 42 4c | 45 0a 0a 54 45 52 4d 5f |ERM_TABL|E..TERM_|
|00004250| 54 41 42 4c 45 5f 53 54 | 41 52 54 28 74 6b 63 61 |TABLE_ST|ART(tkca|
|00004260| 6e 76 61 73 29 0a 20 20 | 20 20 22 74 6b 63 61 6e |nvas). | "tkcan|
|00004270| 76 61 73 22 2c 20 22 54 | 6b 2f 54 63 6c 20 63 61 |vas", "T|k/Tcl ca|
|00004280| 6e 76 61 73 20 77 69 64 | 67 65 74 20 5b 70 65 72 |nvas wid|get [per|
|00004290| 6c 74 6b 5d 20 5b 69 6e | 74 65 72 61 63 74 69 76 |ltk] [in|teractiv|
|000042a0| 65 5d 22 2c 0a 20 20 20 | 20 54 4b 5f 58 4d 41 58 |e]",. | TK_XMAX|
|000042b0| 2c 20 54 4b 5f 59 4d 41 | 58 2c 20 54 4b 5f 56 43 |, TK_YMA|X, TK_VC|
|000042c0| 48 41 52 2c 20 54 4b 5f | 48 43 48 41 52 2c 0a 20 |HAR, TK_|HCHAR,. |
|000042d0| 20 20 20 54 4b 5f 56 54 | 49 43 2c 20 54 4b 5f 48 | TK_VT|IC, TK_H|
|000042e0| 54 49 43 2c 20 54 4b 5f | 6f 70 74 69 6f 6e 73 2c |TIC, TK_|options,|
|000042f0| 20 54 4b 5f 69 6e 69 74 | 2c 20 54 4b 5f 72 65 73 | TK_init|, TK_res|
|00004300| 65 74 2c 0a 20 20 20 20 | 54 4b 5f 74 65 78 74 2c |et,. |TK_text,|
|00004310| 20 6e 75 6c 6c 5f 73 63 | 61 6c 65 2c 20 54 4b 5f | null_sc|ale, TK_|
|00004320| 67 72 61 70 68 69 63 73 | 2c 20 54 4b 5f 6d 6f 76 |graphics|, TK_mov|
|00004330| 65 2c 20 54 4b 5f 76 65 | 63 74 6f 72 2c 0a 20 20 |e, TK_ve|ctor,. |
|00004340| 20 20 54 4b 5f 6c 69 6e | 65 74 79 70 65 2c 20 54 | TK_lin|etype, T|
|00004350| 4b 5f 70 75 74 5f 74 65 | 78 74 2c 20 6e 75 6c 6c |K_put_te|xt, null|
|00004360| 5f 74 65 78 74 5f 61 6e | 67 6c 65 2c 0a 20 20 20 |_text_an|gle,. |
|00004370| 20 54 4b 5f 6a 75 73 74 | 69 66 79 5f 74 65 78 74 | TK_just|ify_text|
|00004380| 2c 20 64 6f 5f 70 6f 69 | 6e 74 2c 20 64 6f 5f 61 |, do_poi|nt, do_a|
|00004390| 72 72 6f 77 2c 20 54 4b | 5f 73 65 74 5f 66 6f 6e |rrow, TK|_set_fon|
|000043a0| 74 2c 0a 20 20 20 20 4e | 55 4c 4c 2c 20 30 2c 20 |t,. N|ULL, 0, |
|000043b0| 4e 55 4c 4c 2c 20 4e 55 | 4c 4c 2c 20 4e 55 4c 4c |NULL, NU|LL, NULL|
|000043c0| 2c 20 54 4b 5f 6c 69 6e | 65 77 69 64 74 68 0a 54 |, TK_lin|ewidth.T|
|000043d0| 45 52 4d 5f 54 41 42 4c | 45 5f 45 4e 44 28 74 6b |ERM_TABL|E_END(tk|
|000043e0| 63 61 6e 76 61 73 29 0a | 23 75 6e 64 65 66 20 4c |canvas).|#undef L|
|000043f0| 41 53 54 5f 54 45 52 4d | 0a 23 64 65 66 69 6e 65 |AST_TERM|.#define|
|00004400| 20 4c 41 53 54 5f 54 45 | 52 4d 20 74 6b 63 61 6e | LAST_TE|RM tkcan|
|00004410| 76 61 73 0a 0a 23 65 6e | 64 69 66 20 2f 2a 20 54 |vas..#en|dif /* T|
|00004420| 45 52 4d 5f 54 41 42 4c | 45 20 2a 2f 0a 23 65 6e |ERM_TABL|E */.#en|
|00004430| 64 69 66 20 2f 2a 20 54 | 45 52 4d 5f 50 52 4f 54 |dif /* T|ERM_PROT|
|00004440| 4f 5f 4f 4e 4c 59 20 2a | 2f 0a 0a 23 69 66 64 65 |O_ONLY *|/..#ifde|
|00004450| 66 20 54 45 52 4d 5f 48 | 45 4c 50 0a 53 54 41 52 |f TERM_H|ELP.STAR|
|00004460| 54 5f 48 45 4c 50 28 74 | 6b 63 61 6e 76 61 73 29 |T_HELP(t|kcanvas)|
|00004470| 0a 22 31 20 74 6b 63 61 | 6e 76 61 73 22 2c 0a 22 |."1 tkca|nvas",."|
|00004480| 3f 63 6f 6d 6d 61 6e 64 | 73 20 73 65 74 20 74 65 |?command|s set te|
|00004490| 72 6d 69 6e 61 6c 20 74 | 6b 63 61 6e 76 61 73 22 |rminal t|kcanvas"|
|000044a0| 2c 0a 22 3f 73 65 74 20 | 74 65 72 6d 69 6e 61 6c |,."?set |terminal|
|000044b0| 20 74 6b 63 61 6e 76 61 | 73 22 2c 0a 22 3f 73 65 | tkcanva|s",."?se|
|000044c0| 74 20 74 65 72 6d 20 74 | 6b 63 61 6e 76 61 73 22 |t term t|kcanvas"|
|000044d0| 2c 0a 22 3f 74 65 72 6d | 69 6e 61 6c 20 74 6b 63 |,."?term|inal tkc|
|000044e0| 61 6e 76 61 73 22 2c 0a | 22 3f 74 65 72 6d 20 74 |anvas",.|"?term t|
|000044f0| 6b 63 61 6e 76 61 73 22 | 2c 0a 22 3f 74 6b 63 61 |kcanvas"|,."?tkca|
|00004500| 6e 76 61 73 22 2c 0a 22 | 20 54 68 69 73 20 74 65 |nvas",."| This te|
|00004510| 72 6d 69 6e 61 6c 20 64 | 72 69 76 65 72 20 67 65 |rminal d|river ge|
|00004520| 6e 65 72 61 74 65 73 20 | 54 6b 20 63 61 6e 76 61 |nerates |Tk canva|
|00004530| 73 20 77 69 64 67 65 74 | 20 63 6f 6d 6d 61 6e 64 |s widget| command|
|00004540| 73 20 62 61 73 65 64 20 | 6f 6e 20 54 63 6c 2f 54 |s based |on Tcl/T|
|00004550| 6b 22 2c 0a 22 20 28 64 | 65 66 61 75 6c 74 29 20 |k",." (d|efault) |
|00004560| 6f 72 20 50 65 72 6c 2e | 20 20 54 6f 20 75 73 65 |or Perl.| To use|
|00004570| 20 69 74 2c 20 72 65 62 | 75 69 6c 64 20 60 67 6e | it, reb|uild `gn|
|00004580| 75 70 6c 6f 74 60 20 28 | 61 66 74 65 72 20 75 6e |uplot` (|after un|
|00004590| 63 6f 6d 6d 65 6e 74 69 | 6e 67 20 6f 72 22 2c 0a |commenti|ng or",.|
|000045a0| 22 20 69 6e 73 65 72 74 | 69 6e 67 20 74 68 65 20 |" insert|ing the |
|000045b0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 6c 69 6e 65 |appropri|ate line|
|000045c0| 20 69 6e 20 5c 22 74 65 | 72 6d 2e 68 5c 22 29 2c | in \"te|rm.h\"),|
|000045d0| 20 74 68 65 6e 22 2c 0a | 22 22 2c 0a 22 20 20 67 | then",.|"",." g|
|000045e0| 6e 75 70 6c 6f 74 3e 20 | 73 65 74 20 74 65 72 6d |nuplot> |set term|
|000045f0| 20 74 6b 63 61 6e 76 61 | 73 20 7b 70 65 72 6c 74 | tkcanva|s {perlt|
|00004600| 6b 7d 20 7b 69 6e 74 65 | 72 61 63 74 69 76 65 7d |k} {inte|ractive}|
|00004610| 22 2c 0a 22 20 20 67 6e | 75 70 6c 6f 74 3e 20 73 |",." gn|uplot> s|
|00004620| 65 74 20 6f 75 74 70 75 | 74 20 27 70 6c 6f 74 2e |et outpu|t 'plot.|
|00004630| 66 69 6c 65 27 22 2c 0a | 22 22 2c 0a 22 20 41 66 |file'",.|"",." Af|
|00004640| 74 65 72 20 69 6e 76 6f | 6b 69 6e 67 20 5c 22 77 |ter invo|king \"w|
|00004650| 69 73 68 5c 22 2c 20 65 | 78 65 63 75 74 65 20 74 |ish\", e|xecute t|
|00004660| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 73 65 71 |he follo|wing seq|
|00004670| 75 65 6e 63 65 20 6f 66 | 20 54 63 6c 2f 54 6b 20 |uence of| Tcl/Tk |
|00004680| 63 6f 6d 6d 61 6e 64 73 | 3a 22 2c 0a 22 22 2c 0a |commands|:",."",.|
|00004690| 22 20 20 25 20 73 6f 75 | 72 63 65 20 70 6c 6f 74 |" % sou|rce plot|
|000046a0| 2e 66 69 6c 65 22 2c 0a | 22 20 20 25 20 63 61 6e |.file",.|" % can|
|000046b0| 76 61 73 20 2e 63 22 2c | 0a 22 20 20 25 20 70 61 |vas .c",|." % pa|
|000046c0| 63 6b 20 2e 63 22 2c 0a | 22 20 20 25 20 67 6e 75 |ck .c",.|" % gnu|
|000046d0| 70 6c 6f 74 20 2e 63 22 | 2c 0a 22 22 2c 0a 22 20 |plot .c"|,."",." |
|000046e0| 4f 72 2c 20 66 6f 72 20 | 50 65 72 6c 2f 54 6b 20 |Or, for |Perl/Tk |
|000046f0| 75 73 65 20 61 20 70 72 | 6f 67 72 61 6d 20 6c 69 |use a pr|ogram li|
|00004700| 6b 65 20 74 68 69 73 3a | 22 2c 0a 22 22 2c 0a 22 |ke this:|",."",."|
|00004710| 20 20 75 73 65 20 54 6b | 3b 22 2c 0a 22 20 20 6d | use Tk|;",." m|
|00004720| 79 20 24 74 6f 70 20 3d | 20 4d 61 69 6e 57 69 6e |y $top =| MainWin|
|00004730| 64 6f 77 2d 3e 6e 65 77 | 3b 22 2c 0a 22 20 20 6d |dow->new|;",." m|
|00004740| 79 20 24 63 20 3d 20 24 | 74 6f 70 2d 3e 43 61 6e |y $c = $|top->Can|
|00004750| 76 61 73 3b 22 2c 0a 22 | 20 20 24 63 2d 3e 70 61 |vas;",."| $c->pa|
|00004760| 63 6b 28 29 3b 22 2c 0a | 22 20 20 64 6f 20 5c 22 |ck();",.|" do \"|
|00004770| 70 6c 6f 74 2e 70 6c 5c | 22 3b 22 2c 0a 22 20 20 |plot.pl\|";",." |
|00004780| 67 6e 75 70 6c 6f 74 2d | 3e 28 24 63 29 3b 22 2c |gnuplot-|>($c);",|
|00004790| 0a 22 20 20 4d 61 69 6e | 4c 6f 6f 70 3b 22 2c 0a |." Main|Loop;",.|
|000047a0| 22 22 2c 0a 22 20 54 68 | 65 20 63 6f 64 65 20 67 |"",." Th|e code g|
|000047b0| 65 6e 65 72 61 74 65 64 | 20 62 79 20 60 67 6e 75 |enerated| by `gnu|
|000047c0| 70 6c 6f 74 60 20 63 72 | 65 61 74 65 73 20 61 20 |plot` cr|eates a |
|000047d0| 70 72 6f 63 65 64 75 72 | 65 20 63 61 6c 6c 65 64 |procedur|e called|
|000047e0| 20 5c 22 67 6e 75 70 6c | 6f 74 5c 22 22 2c 0a 22 | \"gnupl|ot\"",."|
|000047f0| 20 74 68 61 74 20 74 61 | 6b 65 73 20 74 68 65 20 | that ta|kes the |
|00004800| 6e 61 6d 65 20 6f 66 20 | 61 20 63 61 6e 76 61 73 |name of |a canvas|
|00004810| 20 61 73 20 69 74 73 20 | 61 72 67 75 6d 65 6e 74 | as its |argument|
|00004820| 2e 20 20 57 68 65 6e 20 | 74 68 65 20 70 72 6f 63 |. When |the proc|
|00004830| 65 64 75 72 65 20 69 73 | 22 2c 0a 22 20 63 61 6c |edure is|",." cal|
|00004840| 6c 65 64 2c 20 69 74 20 | 63 6c 65 61 72 73 20 74 |led, it |clears t|
|00004850| 68 65 20 63 61 6e 76 61 | 73 2c 20 66 69 6e 64 73 |he canva|s, finds|
|00004860| 20 74 68 65 20 73 69 7a | 65 20 6f 66 20 74 68 65 | the siz|e of the|
|00004870| 20 63 61 6e 76 61 73 20 | 61 6e 64 20 64 72 61 77 | canvas |and draw|
|00004880| 73 20 74 68 65 20 70 6c | 6f 74 22 2c 0a 22 20 69 |s the pl|ot",." i|
|00004890| 6e 20 69 74 2c 20 73 63 | 61 6c 65 64 20 74 6f 20 |n it, sc|aled to |
|000048a0| 66 69 74 2e 22 2c 0a 22 | 22 2c 0a 22 20 46 6f 72 |fit.",."|",." For|
|000048b0| 20 32 2d 64 69 6d 65 6e | 73 69 6f 6e 61 6c 20 70 | 2-dimen|sional p|
|000048c0| 6c 6f 74 74 69 6e 67 20 | 28 60 70 6c 6f 74 60 29 |lotting |(`plot`)|
|000048d0| 20 74 77 6f 20 61 64 64 | 69 74 69 6f 6e 61 6c 20 | two add|itional |
|000048e0| 70 72 6f 63 65 64 75 72 | 65 73 20 61 72 65 20 64 |procedur|es are d|
|000048f0| 65 66 69 6e 65 64 3a 22 | 2c 0a 22 20 5c 22 67 6e |efined:"|,." \"gn|
|00004900| 75 70 6c 6f 74 5f 70 6c | 6f 74 61 72 65 61 5c 22 |uplot_pl|otarea\"|
|00004910| 20 77 69 6c 6c 20 72 65 | 74 75 72 6e 20 61 20 6c | will re|turn a l|
|00004920| 69 73 74 20 63 6f 6e 74 | 61 69 6e 69 6e 67 20 74 |ist cont|aining t|
|00004930| 68 65 20 62 6f 72 64 65 | 72 73 20 6f 66 20 74 68 |he borde|rs of th|
|00004940| 65 20 70 6c 6f 74 74 69 | 6e 67 22 2c 0a 22 20 61 |e plotti|ng",." a|
|00004950| 72 65 61 20 5c 22 78 6c | 65 66 74 2c 20 78 72 69 |rea \"xl|eft, xri|
|00004960| 67 68 74 2c 20 79 74 6f | 70 2c 20 79 62 6f 74 5c |ght, yto|p, ybot\|
|00004970| 22 20 69 6e 20 63 61 6e | 76 61 73 20 73 63 72 65 |" in can|vas scre|
|00004980| 65 6e 20 63 6f 6f 72 64 | 69 6e 61 74 65 73 2c 20 |en coord|inates, |
|00004990| 77 68 69 6c 65 20 74 68 | 65 20 72 61 6e 67 65 73 |while th|e ranges|
|000049a0| 22 2c 0a 22 20 6f 66 20 | 74 68 65 20 74 77 6f 20 |",." of |the two |
|000049b0| 61 78 65 73 20 5c 22 78 | 31 6d 69 6e 2c 20 78 31 |axes \"x|1min, x1|
|000049c0| 6d 61 78 2c 20 79 31 6d | 69 6e 2c 20 79 31 6d 61 |max, y1m|in, y1ma|
|000049d0| 78 2c 20 78 32 6d 69 6e | 2c 20 78 32 6d 61 78 2c |x, x2min|, x2max,|
|000049e0| 20 79 32 6d 69 6e 2c 20 | 79 32 6d 61 78 5c 22 20 | y2min, |y2max\" |
|000049f0| 69 6e 20 70 6c 6f 74 22 | 2c 0a 22 20 63 6f 6f 72 |in plot"|,." coor|
|00004a00| 64 69 6e 61 74 65 73 20 | 63 61 6e 20 62 65 20 6f |dinates |can be o|
|00004a10| 62 74 61 69 6e 65 64 20 | 63 61 6c 6c 69 6e 67 20 |btained |calling |
|00004a20| 5c 22 67 6e 75 70 6c 6f | 74 5f 61 78 69 73 72 61 |\"gnuplo|t_axisra|
|00004a30| 6e 67 65 73 5c 22 2e 22 | 2c 0a 22 20 49 66 20 74 |nges\"."|,." If t|
|00004a40| 68 65 20 5c 22 69 6e 74 | 65 72 61 63 74 69 76 65 |he \"int|eractive|
|00004a50| 5c 22 20 6f 70 74 69 6f | 6e 20 69 73 20 73 70 65 |\" optio|n is spe|
|00004a60| 63 69 66 69 65 64 2c 20 | 6d 6f 75 73 65 20 63 6c |cified, |mouse cl|
|00004a70| 69 63 6b 69 6e 67 20 6f | 6e 20 61 20 6c 69 6e 65 |icking o|n a line|
|00004a80| 20 73 65 67 6d 65 6e 74 | 22 2c 0a 22 20 77 69 6c | segment|",." wil|
|00004a90| 6c 20 70 72 69 6e 74 20 | 74 68 65 20 63 6f 6f 72 |l print |the coor|
|00004aa0| 64 69 6e 61 74 65 73 20 | 6f 66 20 69 74 73 20 6d |dinates |of its m|
|00004ab0| 69 64 70 6f 69 6e 74 20 | 74 6f 20 73 74 64 6f 75 |idpoint |to stdou|
|00004ac0| 74 2e 20 41 64 76 61 6e | 63 65 64 20 61 63 74 69 |t. Advan|ced acti|
|00004ad0| 6f 6e 73 22 2c 0a 22 20 | 63 61 6e 20 68 61 70 70 |ons",." |can happ|
|00004ae0| 65 6e 20 69 6e 73 74 65 | 61 64 20 69 66 20 74 68 |en inste|ad if th|
|00004af0| 65 20 75 73 65 72 20 73 | 75 70 70 6c 69 65 73 20 |e user s|upplies |
|00004b00| 61 20 70 72 6f 63 65 64 | 75 72 65 20 6e 61 6d 65 |a proced|ure name|
|00004b10| 64 22 2c 0a 22 20 5c 22 | 75 73 65 72 5f 67 6e 75 |d",." \"|user_gnu|
|00004b20| 70 6c 6f 74 5f 63 6f 6f | 72 64 69 6e 61 74 65 73 |plot_coo|rdinates|
|00004b30| 5c 22 2c 20 77 68 69 63 | 68 20 74 61 6b 65 73 20 |\", whic|h takes |
|00004b40| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 61 72 |the foll|owing ar|
|00004b50| 67 75 6d 65 6e 74 73 3a | 22 2c 0a 22 20 5c 22 77 |guments:|",." \"w|
|00004b60| 69 6e 20 69 64 20 78 31 | 73 20 79 31 73 20 78 32 |in id x1|s y1s x2|
|00004b70| 73 20 79 32 73 20 78 31 | 65 20 79 31 65 20 78 32 |s y2s x1|e y1e x2|
|00004b80| 65 20 79 32 65 20 78 31 | 6d 20 79 31 6d 20 78 32 |e y2e x1|m y1m x2|
|00004b90| 6d 20 79 32 6d 5c 22 2c | 22 2c 0a 22 20 74 68 65 |m y2m\",|",." the|
|00004ba0| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 63 61 6e | name of| the can|
|00004bb0| 76 61 73 20 61 6e 64 20 | 74 68 65 20 69 64 20 6f |vas and |the id o|
|00004bc0| 66 20 74 68 65 20 6c 69 | 6e 65 20 73 65 67 6d 65 |f the li|ne segme|
|00004bd0| 6e 74 20 66 6f 6c 6c 6f | 77 65 64 20 62 79 20 74 |nt follo|wed by t|
|00004be0| 68 65 22 2c 0a 22 20 63 | 6f 6f 72 64 69 6e 61 74 |he",." c|oordinat|
|00004bf0| 65 73 20 6f 66 20 69 74 | 73 20 73 74 61 72 74 20 |es of it|s start |
|00004c00| 61 6e 64 20 65 6e 64 20 | 70 6f 69 6e 74 20 69 6e |and end |point in|
|00004c10| 20 74 68 65 20 74 77 6f | 20 70 6f 73 73 69 62 6c | the two| possibl|
|00004c20| 65 20 61 78 69 73 20 72 | 61 6e 67 65 73 3b 20 74 |e axis r|anges; t|
|00004c30| 68 65 22 2c 0a 22 20 63 | 6f 6f 72 64 69 6e 61 74 |he",." c|oordinat|
|00004c40| 65 73 20 6f 66 20 74 68 | 65 20 6d 69 64 70 6f 69 |es of th|e midpoi|
|00004c50| 6e 74 20 61 72 65 20 6f | 6e 6c 79 20 66 69 6c 6c |nt are o|nly fill|
|00004c60| 65 64 20 66 6f 72 20 6c | 6f 67 61 72 69 74 68 6d |ed for l|ogarithm|
|00004c70| 69 63 20 61 78 65 73 2e | 22 2c 0a 22 22 2c 0a 22 |ic axes.|",."",."|
|00004c80| 20 54 68 65 20 63 75 72 | 72 65 6e 74 20 76 65 72 | The cur|rent ver|
|00004c90| 73 69 6f 6e 20 6f 66 20 | 60 74 6b 63 61 6e 76 61 |sion of |`tkcanva|
|00004ca0| 73 60 20 73 75 70 70 6f | 72 74 73 20 6e 65 69 74 |s` suppo|rts neit|
|00004cb0| 68 65 72 20 60 6d 75 6c | 74 69 70 6c 6f 74 60 20 |her `mul|tiplot` |
|00004cc0| 6e 6f 72 20 60 72 65 70 | 6c 6f 74 60 2e 22 0a 45 |nor `rep|lot`.".E|
|00004cd0| 4e 44 5f 48 45 4c 50 28 | 74 6b 63 61 6e 76 61 73 |ND_HELP(|tkcanvas|
|00004ce0| 29 0a 23 65 6e 64 69 66 | 0a |).#endif|. |
+--------+-------------------------+-------------------------+--------+--------+